

<template>
  <el-form
    ref="ruleForm"
    size="small"
    :model="ruleForm"
    :rules="rules"
    label-width="120px"
    :disabled="!options.docPermission.commonAreaEdit"
    v-if="options.docPermission.commonAreaVis"
  >

    <el-card class="box-card">
      <el-row :gutter="10">
        <el-col :span="8">
          <el-form-item label="项目租赁类型">
            <el-radio-group v-model="ruleForm.projectBasicVo.rentType">
              <el-radio label="01">直租</el-radio>
              <el-radio label="02">回租</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="16">
          <el-form-item label="是否快速审批">
            <el-radio-group v-model="ruleForm.projectBasicVo.isFastApprove">
              <el-radio label="0">否</el-radio>
              <el-radio label="1">是</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <div>
            <el-form-item
              label="推荐代理人"
              prop="projectBasicVo.agentName"
            >
              <el-input
                v-model="ruleForm.projectBasicVo.agentName"
                placeholder="请选择推荐代理人"
                :style="{width: '100%'}"
              ></el-input>
            </el-form-item>
          </div>
        </el-col>
        <el-col :span="8">
          <div>
            <el-form-item
              label="选择客户"
              prop="customerAdmitVo.customerAdmitInfo.customerName"
            >
              <el-input
                readonly
                v-model="ruleForm.customerAdmitVo.customerAdmitInfo.customerName"
                placeholder="请选择客户"
                :style="{width: '100%'}"
                @click.native="handleCustClick"
              >
              </el-input>
            </el-form-item>
          </div>
        </el-col>
        <el-col :span="8">
          <div>
            <el-form-item
              label="选择出租方"
              prop="projectBasicVo.lessorId"
            >
              <el-select
                v-model="ruleForm.projectBasicVo.lessorId"
                :style="{width: '100%'}"
              >
                <el-option
                  v-for="item in lessorList"
                  :value="item.companyId"
                  :label="item.companyName"
                  :key="item.companyId"
                />
              </el-select>
            </el-form-item>
          </div>
        </el-col>
        <el-col :span="16">
          <el-form-item label="项目所在区域">
            <hsk-address-sel
              :inputNumShow="inputNumShow"
              :inputInterval="inputInterval"
              @addressChange="addressChange"
              :defaultAddress="defaultProjectAddress"
            />
          </el-form-item>
        </el-col>
        <el-col :span="24">
          {{fileTemplate["project_initiation_report"]?.remark}}<el-link
            type="primary"
            :href="fileTemplate['project_initiation_report']?.value"
          >模板下载</el-link>
        </el-col>
        <el-col
          :span="24"
          style="height: 50px;display: flex;align-items: center;"
        >
          <el-upload
            class="upload-demo"
            ref="uploadApplicationFile"
            :accept="fileAccept"
            :action="uploadFileUrl + '/file/saveFile'"
            :before-upload="beforeUpload"
            :on-change="handleApplicationChange"
            :on-success="handleApplicationSuccess"
            :on-remove="handleApplicationRemove"
            :file-list="applicationFile"
            :data="{fileRemark: '', fileuserInfo: ''}"
            :multiple="false"
            :auto-upload="true"
          >
            <el-button
              size="mini"
              type="primary"
              plain
            >点击上传</el-button>
            <el-button
              v-if="options.docPermission.commonDownloadBtnVis && this.ruleForm.projectBasicVo.applicationFileId"
              :disabled="false"
              size="mini"
              type="primary"
              @click="downloadFile({fileUuid: ruleForm.projectBasicVo.applicationFileId})"
            >下载</el-button>
            <el-button
              v-if="options.docPermission.commonDownloadBtnVis && this.ruleForm.projectBasicVo.applicationFileId"
              :disabled="false"
              size="mini"
              type="primary"
              @click="handlePreviewFile({fileUuid: ruleForm.projectBasicVo.applicationFileId})"
            >预览</el-button>
          </el-upload>
        </el-col>
      </el-row>
    </el-card>
    <el-card class="box-card">
      <div class="box">
        <div class="title">客户基本信息</div>
        <el-form
          size="small"
          :model="ruleForm.customerAdmitVo.customerAdmitInfo"
          label-width="170px"
        >
          <el-row :gutter="10">
            <template v-if="ruleForm.customerAdmitVo.customerAdmitInfo.customerType === '01'">
              <el-col :span="6">
                <div
                  class="up_sy_logo_div"
                  style="margin-left: 27px;"
                >
                  <!--支持点击查看大图-->
                  <el-image
                    style="width:267px;height:377px;"
                    :src="ruleForm.hrefn"
                    :preview-src-list="[ruleForm.hrefn]"
                  ></el-image>
                </div>
              </el-col>
              <el-col :span="18">
                <el-row :gutter="10">
                  <el-col :span="12">
                    <el-form-item label="企业名称：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.enterprieName}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="统一社会信用代码：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.creditCode}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="营业期限：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.businessStart}} 至 {{ruleForm.customerAdmitVo.customerAdmitInfo.businessEnd}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="企业类型：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.companyNature}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="注册地址：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.companyAddress}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="注册资本：">
                      {{formatMoney(ruleForm.customerAdmitVo.customerAdmitInfo.registerFund)}}元
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="办公电话：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.companyTel}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="办公地址：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.companyWordaddress}}
                    </el-form-item>
                  </el-col>

                  <el-col :span="12">
                    <el-form-item label="实缴资本：">
                      {{formatMoney(ruleForm.customerAdmitVo.customerAdmitInfo.realityFund)}}元
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="法人身份证号：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.legalpersonCreditcode}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="法定代表人：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.legalpersonName}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="法人身份证图片：">
                      <div style="display: flex; align-items: center;">
                        <div
                          class="up_sy_logo_div"
                          style="margin-left: 27px;"
                        >
                          <!--法人身份证正面-支持点击查看大图-->
                          <el-image
                            style="width:134px;height:90px;"
                            :src="ruleForm.frontFn"
                            :preview-src-list="[ruleForm.frontFn]"
                          ></el-image>
                        </div>
                        <div
                          class="up_sy_logo_div"
                          style="margin-left: 27px;"
                        >
                          <!--法人身份证反面-支持点击查看大图-->
                          <el-image
                            style="width:134px;height:90px;"
                            :src="ruleForm.backFn"
                            :preview-src-list="[ruleForm.backFn]"
                          ></el-image>
                        </div>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="实际控制人：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.controlPerson}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="实际控制人描述：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.controlPersonDesc}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="项目联系人：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.projectPerson}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="项目联系人电话：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.projectPersonTel}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="经营范围：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.businessScope}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="职工人数：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.staffNumber}}
                    </el-form-item>
                  </el-col>
                  <!-- <el-col :span="12">
                    <el-form-item label="成立时间：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.companySetDate}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="行政区划：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.companyWordaddress}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="资产情况描述：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.assetCondition}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="公司征信：">
                      {{creditEnum[ruleForm.customerAdmitVo.customerAdmitInfo.companyCredit]}}
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="公司基本情况描述：">
                      {{ruleForm.customerAdmitVo.customerAdmitInfo.companyCondition}}
                    </el-form-item>
                  </el-col> -->
                </el-row>
              </el-col>
            </template>
            <template v-if="ruleForm.customerAdmitVo.customerAdmitInfo.customerType === '02'">
              <el-col :span="6">
                <el-row>
                  <div
                    class="up_sy_logo_div"
                    style="margin-left: 27px;"
                  >
                    <el-image
                      v-if="ruleForm.customerAdmitVo.customerAdmitInfo.frontFn"
                      style="width:267px;height:180px;"
                      :src="ruleForm.frontFn"
                      :preview-src-list="ruleForm.frontFn ? [ruleForm.frontFn] : []"
                    ></el-image>
                  </div>
                </el-row>
                <el-row>
                  <div
                    class="up_sy_logo_div"
                    style="margin-left: 27px;"
                  >
                    <el-image
                      v-if="ruleForm.customerAdmitVo.customerAdmitInfo.backFn"
                      style="width:267px;height:180px;"
                      :src="ruleForm.backFn"
                      :preview-src-list="ruleForm.backFn ? [ruleForm.backFn] : []"
                    ></el-image>
                  </div>
                </el-row>
              </el-col>
              <el-col :span="18">
                <el-col :span="12">
                  <el-form-item
                    label="姓名："
                    prop="customerName"
                  >
                    {{ruleForm.customerAdmitVo.customerAdmitInfo.customerName}}
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="家庭住址："
                    prop=""
                  >
                    {{ruleForm.customerAdmitVo.customerAdmitInfo.personalAddress}}
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="性别："
                    prop="customerSex"
                  >
                    <dict-tag
                      :options="dict.type.sys_user_sex"
                      :value="ruleForm.customerAdmitVo.customerAdmitInfo.customerSex"
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="户籍所在地："
                    prop=""
                  >
                    {{ruleForm.customerAdmitVo.customerAdmitInfo.personalHousehold}}
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="身份证号码："
                    prop="customerCreditcode"
                  >
                    {{ruleForm.customerAdmitVo.customerAdmitInfo.customerCreditcode}}
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="工作单位："
                    prop=""
                  >
                    {{ruleForm.customerAdmitVo.customerAdmitInfo.personalWorkaddress}}
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="出生日期："
                    prop="birthDate"
                  >
                    {{ruleForm.customerAdmitVo.customerAdmitInfo.birthDate}}
                  </el-form-item>
                </el-col>
                <!-- <el-col :span="12">
                  <el-form-item
                    label="个人征信："
                    prop="personalCredit"
                  >
                    {{creditEnum[ruleForm.customerAdmitVo.customerAdmitInfo.personalCredit]}}
                  </el-form-item>
                </el-col> -->
                <el-col :span="12">
                  <el-form-item
                    label="项目联系人："
                    prop="customerPhone"
                  >
                    {{ruleForm.customerAdmitVo.customerAdmitInfo.projectPerson}}
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="电话号码："
                    prop="customerPhone"
                  >
                    {{ruleForm.customerAdmitVo.customerAdmitInfo.customerPhone}}
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="项目联系人电话："
                    prop="customerPhone"
                  >
                    {{ruleForm.customerAdmitVo.customerAdmitInfo.projectPersonTel}}
                  </el-form-item>
                </el-col>
                <!-- <el-col :span="12">
                  <el-form-item
                    label="客户评级："
                    prop="customerRate"
                  >
                    {{ruleForm.customerAdmitVo.customerAdmitInfo.customerRate}}
                  </el-form-item>
                </el-col> -->
                <el-col :span="12">
                  <el-form-item
                    label="民族："
                    prop="customerNation"
                  >
                    <dict-tag
                      :options="dict.type.sys_nation"
                      :value="ruleForm.customerAdmitVo.customerAdmitInfo.customerNation"
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="学历："
                    prop="customerEduc"
                  >
                    <dict-tag
                      :options="dict.type.sys_education"
                      :value="ruleForm.customerAdmitVo.customerAdmitInfo.customerEduc"
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item
                    label="婚姻状况："
                    prop="customerMarriage"
                  >
                    {{marriageEnum[ruleForm.customerAdmitVo.customerAdmitInfo.customerMarriage]}}
                  </el-form-item>
                </el-col>
              </el-col>
            </template>
          </el-row>
          <!-- <el-row>
            <el-col
              :span="6"
              v-if="ruleForm.customerAdmitVo.customerAdmitInfo.customerinfoFile"
            >
              <i class="tz-icon-ppt" />
              <el-link
                type="primary"
                @click="downloadFile({fileUuid: ruleForm.customerAdmitVo.customerAdmitInfo.customerinfoFile})"
              >《客户基本信息表》</el-link>
              <el-link
                type="primary"
                size="mini"
                @click="handlePreviewFile({ fileUuid: ruleForm.customerAdmitVo.customerAdmitInfo.customerinfoFile})"
              >预览</el-link>
            </el-col>
            <el-col
              :span="6"
              v-if="ruleForm.customerAdmitVo.customerAdmitInfo.applyFile"
            >
              <i class="tz-icon-doc" />
              <el-link
                type="primary"
                @click="downloadFile({fileUuid: ruleForm.customerAdmitVo.customerAdmitInfo.applyFile})"
              >《融资租赁申请书》</el-link>
              <el-link
                type="primary"
                size="mini"
                @click="handlePreviewFile({ fileUuid: ruleForm.customerAdmitVo.customerAdmitInfo.applyFile})"
              >预览</el-link>
            </el-col>
            <el-col
              :span="6"
              v-if="ruleForm.customerAdmitVo.customerAdmitInfo.supplementFileList && ruleForm.customerAdmitVo.customerAdmitInfo.supplementFileList.length > 0"
            >
              <i class="tz-icon-pdf" />
              <el-link
                type="primary"
                @click="downloadFileList(ruleForm.customerAdmitVo.customerAdmitInfo.supplementFileList)"
              >其他补充材料</el-link>
              <el-link
                type="primary"
                size="mini"
                style="margin-left: 10px"
                v-for="(item, index) in ruleForm.customerAdmitVo.customerAdmitInfo.supplementFileList"
                :key="index"
                @click="handlePreviewFile({ fileUuid: item.fileUuid})"
              >{{item.fileName}}预览</el-link>
            </el-col>
          </el-row> -->
        </el-form>
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="box">
        <div class="title">
          <span>
            <span style="color: #F56C6C;margin-right: 4px;">*</span>《融资租赁申请书》
            <el-link
              style="font-size: 19px;"
              type="primary"
              @click="downloadTemplateFile(fileTemplate['financial_indicators'].value)"
            >模板下载</el-link>
          </span>
        </div>
        <el-form-item
          style="margin-bottom: 0px;"
          label="附件上传"
        >
          <el-upload
            class="upload-demo"
            ref="uploadRZZLFile"
            :accept="fileAccept"
            :action="uploadFileUrl + '/file/saveFile'"
            :before-upload="beforeUpload"
            :on-change="handleRZZLChange"
            :on-success="handleRZZLSuccess"
            :on-remove="handleRZZlRemove"
            :file-list="rzzlFile"
            :data="{fileRemark: '', fileuserInfo: ''}"
            :multiple="false"
            :auto-upload="true"
          >
            <el-button
              size="small"
              type="primary"
              class="el-icon-upload2"
            >点击上传</el-button>
            <el-button
              :disabled="false"
              v-if="options.docPermission.commonDownloadBtnVis && this.ruleForm.projectBasicVo.leaseFileId"
              size="small"
              type="primary"
              @click="downloadFile({fileUuid: ruleForm.projectBasicVo.leaseFileId})"
            >下载</el-button>
            <el-button
              :disabled="false"
              v-if="options.docPermission.commonDownloadBtnVis && this.ruleForm.projectBasicVo.leaseFileId"
              size="small"
              type="primary"
              @click="handlePreviewFile({fileUuid: ruleForm.projectBasicVo.leaseFileId})"
            >预览</el-button>
          </el-upload>
        </el-form-item>
      </div>
    </el-card>
    <!-- 客户评分授信 -->
    <el-card class="box-card">
      <div class="box">
        <div class="title">客户评分授信</div>
        <!-- <div v-if="ruleForm.SXPFShow">
          <div class="text">{{ruleForm.custName}}（评分{{ruleForm.customerCreditInfo.creditScore}}分，{{ruleForm.configCreditLevelListData.creditLevel}}级，信用系数：{{ruleForm.configCreditLevelListData.creditFactor}}）</div>
          <div class="text">授信额度：{{ruleForm.customerCreditInfo.creditLimit}}，剩余授信额度：{{ruleForm.customerCreditInfo.availableLimit}}(含本项目)</div>
          <div class="text">上次尽调日期：{{ruleForm.customerCreditInfo.availableBeginTime}} 有效期至：{{ruleForm.customerCreditInfo.availableEndTime}}</div>
        </div> -->
        <template v-if="ruleForm.SXPFShow">
          <!-- <div class="title">
            客户评分授信
          </div> -->
          <el-descriptions
            :column="1"
            border
          >
            <el-descriptions-item :label="ruleForm.custName">（评分: {{ ruleForm.customerCreditInfo.creditScore }}分，{{ ruleForm.configCreditLevelListData.creditLevel }}级，信用系数：{{ ruleForm.configCreditLevelListData.creditFactor }}）</el-descriptions-item>
          </el-descriptions>
          <el-descriptions
            :column="2"
            border
          >
            <el-descriptions-item label="授信额度">{{ formatMoney(ruleForm.customerCreditInfo.creditLimit) }}元</el-descriptions-item>
            <el-descriptions-item label="剩余授信额度">{{ formatMoney(ruleForm.customerCreditInfo.availableLimit) }}元</el-descriptions-item>
            <el-descriptions-item label="上次授信日期">{{ ruleForm.customerCreditInfo.availableBeginTime }}</el-descriptions-item>
            <el-descriptions-item label="有效期至">{{ ruleForm.customerCreditInfo.availableEndTime }}</el-descriptions-item>
          </el-descriptions>
        </template>
      </div>
    </el-card>
    <!-- 客户准入信息 -->
    <el-card class="box-card">
      <div class="box">
        <div class="title">
          <div>客户准入信息</div>
          <el-button
            type="text"
            size="small"
            v-if="clientAdmittanceMsgShow"
            @click="clientAdmittanceMsgShow = false"
          >[收起详情]
          </el-button>
          <el-button
            v-else
            type="text"
            size="small"
            @click="clientAdmittanceMsgShow = true"
          >[展开详情]
          </el-button>
        </div>
        <el-form
          size="small"
          disabled
          v-if="clientAdmittanceMsgShow"
          :model="ruleForm.customerAdmitVo.customerAdmitInfo"
        >
          <!-- 客户基本信息表 -->
          <el-col :span="24">
            <div
              class="title"
              style='font-size: 14px;'
            >
              客户基本信息表
              <!-- <el-link
                type="primary"
                @click="downloadTemplateFile(fileTemplate['finance_lease_data_list'].value)"
              >模板下载</el-link> -->
            </div>
            <el-upload
              disabled
              class="upload-demo"
              :ref="'uploadCustFile'"
              :accept="fileAccept"
              :action="uploadFileUrl + '/file/saveFile'"
              :before-upload="beforeUpload"
              :file-list="customerList"
              :data="{fileRemark: '', fileuserInfo: ''}"
              :multiple="false"
              :auto-upload="true"
            >
              <el-button
                type="text"
                style="font-size: 16px;"
                icon="el-icon-upload2"
              ></el-button>
            </el-upload>
            <div v-if="customerList.length">
              <el-button
                size="mini"
                type="text"
                :disabled="false"
                @click="handleDownloadFile({fileUuid: ruleForm.customerinfoFile})"
              >下载</el-button>
              <el-button
                size="mini"
                type="text"
                :disabled="false"
                @click="handlePreviewFile({fileUuid: ruleForm.customerinfoFile})"
              >预览</el-button>
            </div>
          </el-col>
          <!-- /企业（个人）经营情况描述： -->
          <el-col :span="24">
            <el-form-item label="企业（个人）经营情况描述：">
              <el-col :span="24">
                <el-form-item
                  label="情况说明"
                  prop="companyCondition"
                  label-width="100px"
                >
                  <el-input
                    :rows="2"
                    type="textarea"
                    v-model="ruleForm.companyCondition"
                    placeholder="请输入情况说明"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-table
                  :data="ruleForm.companyConditionFileList"
                  style="width: 100%;"
                  border
                >
                  <el-table-column
                    label="附件名称"
                    prop="fileName"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileName"
                        placeholder="请输入附件名称"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件说明"
                    prop="fileRemark"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileRemark"
                        placeholder="请输入附件说明"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件上传"
                    prop="fileList"
                  >
                    <template slot-scope="scope">
                      <el-upload
                        class="upload-demo"
                        :ref="'assetUploadFile' + '_' + scope.$index"
                        :accept="fileAccept"
                        :action="uploadFileUrl + '/file/saveFile'"
                        :before-upload="beforeUpload"
                        :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                        :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'assetUploadFile'+ '_' + scope.$index)"
                        :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                        :file-list="scope.row.fileList"
                        :data="{fileRemark: '', fileuserInfo: ''}"
                        :multiple="false"
                        :auto-upload="true"
                      >
                        <el-button
                          type="text"
                          style="font-size: 16px;"
                          icon="el-icon-upload2"
                        ></el-button>
                      </el-upload>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="操作"
                    width="150px"
                    v-if="ruleForm.companyConditionFileList[0].fileList.length > 0"
                  >
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="text"
                        :disabled="false"
                        @click="handleDownloadFile(scope.row)"
                      >下载</el-button>
                      <el-button
                        size="mini"
                        type="text"
                        :disabled="false"
                        @click="handlePreviewFile(scope.row)"
                      >预览</el-button>
                    </template>
                  </el-table-column>
                </el-table>
              </el-col>
            </el-form-item>
          </el-col>
          <!-- 资产状况 -->
          <el-col :span="24">
            <el-form-item label="资产状况">
              <el-col :span="24">
                <el-form-item
                  label="情况说明"
                  prop="assetCondition"
                  label-width="100px"
                >
                  <el-input
                    :rows="2"
                    type="textarea"
                    v-model="ruleForm.assetCondition"
                    placeholder="请输入情况说明"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-table
                  :data="ruleForm.assetConditionFileList"
                  style="width: 100%;"
                  border
                >
                  <el-table-column
                    label="附件名称"
                    prop="fileName"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileName"
                        placeholder="请输入附件名称"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件说明"
                    prop="fileRemark"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileRemark"
                        placeholder="请输入附件说明"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件上传"
                    prop="fileList"
                  >
                    <template slot-scope="scope">
                      <el-upload
                        class="upload-demo"
                        :ref="'assetUploadFile' + '_' + scope.$index"
                        :accept="fileAccept"
                        :action="uploadFileUrl + '/file/saveFile'"
                        :before-upload="beforeUpload"
                        :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                        :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'assetUploadFile'+ '_' + scope.$index)"
                        :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                        :file-list="scope.row.fileList"
                        :data="{fileRemark: '', fileuserInfo: ''}"
                        :multiple="false"
                        :auto-upload="true"
                      >
                        <el-button
                          type="text"
                          style="font-size: 16px;"
                          icon="el-icon-upload2"
                        ></el-button>
                      </el-upload>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="操作"
                    width="150px"
                    v-if="ruleForm.assetConditionFileList[0].fileList.length > 0"
                  >
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="text"
                        :disabled="false"
                        @click="handleDownloadFile(scope.row)"
                      >下载</el-button>
                      <el-button
                        size="mini"
                        type="text"
                        :disabled="false"
                        @click="handlePreviewFile(scope.row)"
                      >预览</el-button>
                    </template>
                  </el-table-column>
                </el-table>
              </el-col>
            </el-form-item>
          </el-col>
          <!-- 客户征信情况 -->
          <el-col :span="24">
            <el-form-item label="客户征信情况">
              <el-col :span="24">
                <el-form-item
                  label="征信情况"
                  prop="creditInfo"
                  label-width="100px"
                >
                  <el-radio-group v-model="ruleForm.creditInfo">
                    <el-radio :label="1">很好</el-radio>
                    <el-radio :label="2">良好</el-radio>
                    <el-radio :label="3">一般</el-radio>
                    <el-radio :label="4">差</el-radio>
                  </el-radio-group>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item
                  label="情况说明"
                  prop="creditCondition"
                  label-width="100px"
                >
                  <el-input
                    :rows="2"
                    type="textarea"
                    v-model="ruleForm.creditCondition"
                    placeholder="请输入情况说明"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-table
                  :data="ruleForm.creditConditionFileList"
                  style="width: 100%;"
                  border
                >
                  <el-table-column
                    label="附件名称"
                    prop="fileName"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileName"
                        placeholder="请输入附件名称"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件说明"
                    prop="fileRemark"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileRemark"
                        placeholder="请输入附件说明"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件上传"
                    prop="fileList"
                  >
                    <template slot-scope="scope">
                      <el-upload
                        class="upload-demo"
                        :ref="'creditUploadFile' + '_' + scope.$index"
                        :accept="fileAccept"
                        :action="uploadFileUrl + '/file/saveFile'"
                        :before-upload="beforeUpload"
                        :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                        :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'creditUploadFile'+ '_' + scope.$index)"
                        :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                        :file-list="scope.row.fileList"
                        :data="{fileRemark: '', fileuserInfo: ''}"
                        :multiple="false"
                        :auto-upload="true"
                      >
                        <el-button
                          type="text"
                          style="font-size: 16px;"
                          icon="el-icon-upload2"
                        ></el-button>
                      </el-upload>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="操作"
                    width="150px"
                    v-if="ruleForm.creditConditionFileList[0].fileList.length > 0"
                  >
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="text"
                        :disabled="false"
                        @click="handleDownloadFile(scope.row)"
                      >下载</el-button>
                      <el-button
                        size="mini"
                        type="text"
                        :disabled="false"
                        @click="handlePreviewFile(scope.row)"
                      >预览</el-button>
                    </template>
                  </el-table-column>
                </el-table>
              </el-col>
            </el-form-item>
          </el-col>
          <!-- 客户尽调细审报告 -->
          <el-col :span="24">
            <el-form-item label="客户尽调细审报告">
              <el-col :span="24">
                <el-form-item
                  label="情况说明"
                  prop="surveyCondition"
                  label-width="100px"
                >
                  <el-input
                    :rows="2"
                    type="textarea"
                    v-model="ruleForm.surveyCondition"
                    placeholder="请输入情况说明"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-table
                  :data="ruleForm.surveyConditionFileList"
                  style="width: 100%;"
                  border
                >
                  <el-table-column
                    label="附件名称"
                    prop="fileName"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileName"
                        placeholder="请输入附件名称"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件说明"
                    prop="fileRemark"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileRemark"
                        placeholder="请输入附件说明"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件上传"
                    prop="fileList"
                  >
                    <template slot-scope="scope">
                      <el-upload
                        class="upload-demo"
                        :ref="'surveyUploadFile' + '_' + scope.$index"
                        :accept="fileAccept"
                        :action="uploadFileUrl + '/file/saveFile'"
                        :before-upload="beforeUpload"
                        :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                        :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'surveyUploadFile'+ '_' + scope.$index)"
                        :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                        :file-list="scope.row.fileList"
                        :data="{fileRemark: '', fileuserInfo: ''}"
                        :multiple="false"
                        :auto-upload="true"
                      >
                        <el-button
                          type="text"
                          style="font-size: 16px;"
                          icon="el-icon-upload2"
                        ></el-button>
                      </el-upload>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="操作"
                    width="150px"
                    v-if="ruleForm.surveyConditionFileList[0].fileList.length > 0"
                  >
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="text"
                        :disabled="false"
                        @click="handleDownloadFile(scope.row)"
                      >下载</el-button>
                      <el-button
                        size="mini"
                        type="text"
                        :disabled="false"
                        @click="handlePreviewFile(scope.row)"
                      >预览</el-button>
                    </template>
                  </el-table-column>
                </el-table>
              </el-col>
            </el-form-item>
          </el-col>
          <!-- 担保信息说明 -->
          <el-col :span="24">
            <el-form-item label="担保信息说明">
              <el-col :span="24">
                <el-form-item
                  label="情况说明"
                  prop="guranteeCondition"
                  label-width="100px"
                >
                  <el-input
                    :rows="2"
                    type="textarea"
                    v-model="ruleForm.guranteeCondition"
                    placeholder="请输入情况说明"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-table
                  :data="ruleForm.guranteeConditionFileList"
                  style="width: 100%;"
                  border
                >
                  <el-table-column
                    label="附件名称"
                    prop="fileName"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileName"
                        placeholder="请输入附件名称"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件说明"
                    prop="fileRemark"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileRemark"
                        placeholder="请输入附件说明"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件上传"
                    prop="fileList"
                  >
                    <template slot-scope="scope">
                      <el-upload
                        class="upload-demo"
                        :ref="'guranteeUploadFile' + '_' + scope.$index"
                        :accept="fileAccept"
                        :action="uploadFileUrl + '/file/saveFile'"
                        :before-upload="beforeUpload"
                        :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                        :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'guranteeUploadFile'+ '_' + scope.$index)"
                        :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                        :file-list="scope.row.fileList"
                        :data="{fileRemark: '', fileuserInfo: ''}"
                        :multiple="false"
                        :auto-upload="true"
                      >
                        <el-button
                          type="text"
                          style="font-size: 16px;"
                          icon="el-icon-upload2"
                        ></el-button>
                      </el-upload>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="操作"
                    width="150px"
                    v-if="ruleForm.guranteeConditionFileList[0].fileList.length > 0"
                  >
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="text"
                        :disabled="false"
                        @click="handleDownloadFile(scope.row)"
                      >下载</el-button>
                      <el-button
                        size="mini"
                        type="text"
                        :disabled="false"
                        @click="handlePreviewFile(scope.row)"
                      >预览</el-button>
                    </template>
                  </el-table-column>
                </el-table>
              </el-col>
            </el-form-item>
          </el-col>
        </el-form>
      </div>
    </el-card>
    <!-- 客户基础信息 -->
    <el-card class="box-card">
      <div class="box">
        <div class="title">
          <div>客户基础信息</div>
          <el-button
            type="text"
            size="small"
            v-if="clientBasicsMsgShow"
            @click="clientBasicsMsgShow = false"
          >[收起详情]
          </el-button>
          <el-button
            v-else
            type="text"
            size="small"
            @click="clientBasicsMsgShow = true"
          >[展开详情]
          </el-button>
        </div>
        <div
          class="xinxiList"
          v-if="clientBasicsMsgShow"
        >
          <!-- 银行账户信息 -->
          <div class="box">
            <div class="title">
              <div>银行账户信息</div>
              <el-button
                class="tz-icon-add"
                type="primary"
                size="small"
                @click="handleAddCustomerBank"
              >添加账户</el-button>
            </div>
            <el-table
              :data="ruleForm.bankAccountList"
              style="width: 100%; margin-bottom: 20px"
            >
              <!-- <el-table-column
                label="银行名称"
                prop="bankName"
              /> -->
              <el-table-column
                label="开户行名称"
                prop="bankOpenname"
              />
              <el-table-column
                label="银行卡号"
                prop="bankCardno"
              />
              <el-table-column
                label="账户性质"
                prop="accountType"
              >
                <template slot-scope="scope">
                  {{ handleAddBankType(scope.row.accountType) }}
                </template>
              </el-table-column>

              <!-- <el-table-column
                label="银行开户名"
                prop="bankCutname"
              /> -->
              <el-table-column
                label="操作"
                width="120"
              >
                <template #default="scope">
                  <div style="display: flex;justify-content: space-between;">
                    <el-link
                      v-if="options.docPermission.commonAreaEdit"
                      @click="handleEditCustomerBank(scope.row)"
                      type="primary"
                      size="small"
                    >编辑</el-link>
                    <el-link
                      v-if="options.docPermission.commonAreaEdit"
                      @click="handleDelCustomerBank(scope.row, scope.$index)"
                      type="danger"
                      size="small"
                    >删除</el-link>
                  </div>
                </template>
              </el-table-column>
            </el-table>
          </div>
          <!-- 发票信息 -->
          <div class="box">
            <div class="title">
              <div>发票信息</div>
              <el-button
                class="tz-icon-add"
                type="primary"
                size="small"
                @click="handleCheckInvoice()"
              >保存</el-button>
            </div>
            <el-row :gutter="10">
              <el-col :span="8">
                <el-form-item label="发票抬头">
                  <el-input
                    v-model="ruleForm.projectBasicVo.invoice_title"
                    :style="{width: '100%'}"
                    :disabled="true"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item label="税号">
                  <el-input
                    v-model="ruleForm.projectBasicVo.tax_no"
                    :style="{width: '100%'}"
                    :disabled="true"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item
                  label="开户行"
                  prop="projectBasicVo.invoice_bank"
                >
                  <el-input
                    v-model="ruleForm.projectBasicVo.invoice_bank"
                    placeholder="请输入开户行"
                    :style="{width: '100%'}"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item
                  label="联系电话"
                  prop="projectBasicVo.invoice_tle"
                >
                  <el-input
                    v-model="ruleForm.projectBasicVo.invoice_tle"
                    maxlength="11"
                    placeholder="请输入联系电话"
                    :style="{width: '100%'}"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item
                  label="银行账号"
                  prop="projectBasicVo.invoice_account"
                >
                  <el-input
                    v-model="ruleForm.projectBasicVo.invoice_account"
                    placeholder="请输入银行账号"
                    maxlength="19"
                    :style="{width: '100%'}"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="16">
                <el-form-item
                  label="地址"
                  prop="projectBasicVo.invoice_address"
                >
                  <el-input
                    v-model="ruleForm.projectBasicVo.invoice_address"
                    placeholder="请输入地址"
                    :style="{width: '100%'}"
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </div>
          <!-- 邮寄地址 -->
          <div class="box">
            <div class="title">
              <div>客户联系信息（邮寄地址）</div>
              <el-button
                class="tz-icon-add"
                type="primary"
                size="small"
                @click="handleCheckContact()"
              >保存</el-button>
            </div>
            <el-row :gutter="10">
              <el-col :span="8">
                <el-form-item
                  label="收件人名称"
                  prop="projectBasicVo.recipientName"
                >
                  <el-input
                    v-model="ruleForm.projectBasicVo.recipientName"
                    placeholder="请输入收件人名称"
                    clearable
                  >
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item
                  label="收件人电话"
                  prop="projectBasicVo.recipientPhone"
                >
                  <el-input
                    v-model="ruleForm.projectBasicVo.recipientPhone"
                    placeholder="请输入收件人电话"
                    maxlength="11"
                    clearable
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="8">
                <el-form-item
                  label="电子邮箱"
                  prop="projectBasicVo.recipEmail"
                >
                  <el-input
                    v-model="ruleForm.projectBasicVo.recipEmail"
                    placeholder="请输入电子邮箱"
                    clearable
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="16">
                <el-form-item label="所在区域">
                  <hsk-address-sel
                    :addressShow="addressShow"
                    :inputNumShow="inputNumShow"
                    :inputInterval="inputInterval"
                    @addressChange="DZaddressChange"
                    :defaultAddress="defaultMailAddress"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="16">
                <el-form-item
                  label="详细地址"
                  prop="projectBasicVo.mailDetailAddr"
                >
                  <el-input
                    v-model="ruleForm.projectBasicVo.mailDetailAddr"
                    placeholder="请输入详细地址"
                    clearable
                  ></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </div>
          <!-- 中登网信息 -->
          <div class="box">
            <div class="title">
              <div>中登网信息：</div>
              <el-button
                class="tz-icon-add"
                type="primary"
                size="small"
                @click="handleCheckNetwork()"
              >保存</el-button>
            </div>
            <el-row :gutter="10">
              <el-col :span="24">
                <el-form-item
                  label="情况说明"
                  prop="projectBasicVo.networkRuleForm.zdpresenInfo"
                >
                  <el-input
                    v-model="ruleForm.projectBasicVo.networkRuleForm.zdpresenInfo"
                    placeholder="请输入情况说明"
                  ></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-table
                  :data="ruleForm.projectBasicVo.networkRuleForm.annexInfoList"
                  style="width: 100%;"
                  border
                >
                  <el-table-column
                    label="附件名称"
                    prop="fileName"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileName"
                        placeholder="请输入附件名称"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件说明"
                    prop="fileRemark"
                  >
                    <template slot-scope="scope">
                      <el-input
                        v-model="scope.row.fileRemark"
                        placeholder="请输入附件说明"
                      ></el-input>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="附件上传"
                    prop="fileList"
                  >
                    <template slot-scope="scope">
                      <el-upload
                        class="upload-demo"
                        :ref="'uploadFile' + '_' + scope.$index"
                        :accept="fileAccept"
                        :action="uploadFileUrl + '/file/saveFile'"
                        :before-upload="beforeUpload"
                        :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                        :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile'+ '_' + scope.$index)"
                        :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                        :file-list="scope.row.fileList"
                        :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                        :multiple="false"
                        :auto-upload="true"
                      >
                        <el-button
                          type="text"
                          style="font-size: 16px;"
                          icon="el-icon-upload2"
                        ></el-button>
                      </el-upload>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="操作"
                    width="150px"
                    v-if="ruleForm.projectBasicVo.networkRuleForm.annexInfoList[0].fileList.length > 0"
                  >
                    <template slot-scope="scope">
                      <el-button
                        size="mini"
                        type="text"
                        @click="downloadFile(scope.row)"
                      >下载</el-button>
                      <el-button
                        size="mini"
                        type="text"
                        @click="handlePreviewFile(scope.row)"
                      >预览</el-button>
                    </template>
                  </el-table-column>
                </el-table>
              </el-col>
            </el-row>
          </div>
        </div>
      </div>
    </el-card>
    <!-- 设备信息 -->
    <el-card class="box-card">
      <div class="box">
        <div class="title">
          <div><span style="color: #F56C6C;margin-right: 4px;">*</span>设备信息</div>
          <el-button
            class="tz-icon-add"
            type="primary"
            size="small"
            @click="handleEquipmentClick"
          >添加设备</el-button>
        </div>
        <el-table
          :data="ruleForm.equipmentVos"
          show-summary
          ref="table"
          :key="tableKey"
          style="width: 100%; margin-bottom: 20px"
          :summary-method="getSummaries"
        >
          <el-table-column
            label="设备名称"
            width="300"
            prop="equipmentName"
          ></el-table-column>
          <el-table-column
            label="规格型号"
            width="130"
            prop="equipmentModel"
          ></el-table-column>
          <el-table-column
            label="单位"
            width="100"
            prop="unit"
          ></el-table-column>
          <el-table-column
            label="配置信息"
            prop="configInfo"
          >
            <template #default="{row}">
              <el-input
                v-model="row.configInfo"
                placeholder="请输入配置信息"
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column
            label="数量"
            width="100"
            prop="num"
          >
            <template #default="{row}">
              <el-input
                v-model="row.num"
                type="number"
                :min="1"
                placeholder="请输入数量"
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column
            label="单价（元）"
            prop="price"
            width="130"
          >
            <template #default="{row}">
              <el-input
                v-model="row.price"
                placeholder="请输入单价"
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column
            label="留购价格"
            width="130"
            prop="priceRetain"
          >
            <template #default="{row}">
              <el-input
                v-model="row.priceRetain"
                disabled
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column
            label="总价（元）"
            width="300"
            prop="totalPrice"
          >
            <template #default="{row}">
              {{ handlePrice(row) }}
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            width="150"
          >
            <template #default="scope">
              <el-link
                type="danger"
                @click="handleDel(scope.$index, 'equipmentVos')"
                v-if="options.docPermission.commonAreaEdit"
              >删除</el-link>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <!-- 租赁意向方案 -->
    <el-card class="box-card">
      <div class="box">
        <div class="title">租赁意向方案</div>
        <el-row :gutter="10">
          <el-col :span="6">
            <el-form-item
              label="合同价款"
              prop="rentCalculateVo.calculateInfo.leasingPrice"
            >
              <el-input
                v-model="ruleForm.rentCalculateVo.calculateInfo.leasingPrice"
                placeholder="请输入合同价款"
                clearable
              >
                <i slot="suffix">{{formatLeasingPrice}}</i>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="融资期限"
              prop="rentCalculateVo.calculateInfo.leaseTermMonths"
            >
              <el-input
                v-model="ruleForm.rentCalculateVo.calculateInfo.leaseTermMonths"
                placeholder="请输入融资期限"
                clearable
              >
                <i slot="suffix">月</i>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="还款周期"
              prop="rentCalculateVo.calculateInfo.repaymentCycle"
            >
              <el-select
                v-model="ruleForm.rentCalculateVo.calculateInfo.repaymentCycle"
                @change="handleRepaymentCycleChange"
                :style="{width: '100%'}"
              >
                <el-option
                  v-for="item in repaymentCycleOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="宽限期"
              prop="gracePeriodMonths"
            >
              <el-tooltip
                class="item"
                effect="dark"
                content="还款周期为月付/双月付/季付/半年付时，宽限期一期分别表示1个月/2个月/3个月/6个月"
                placement="top"
              >
                <el-input
                  v-model="ruleForm.rentCalculateVo.calculateInfo.gracePeriodMonths"
                  placeholder="请输入宽限期"
                  clearable
                  :style="{width: '100%'}"
                >
                  <i slot="suffix">期</i>
                </el-input>
              </el-tooltip>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="起始日期"
              prop="startDay"
            >
              <el-date-picker
                v-model="ruleForm.rentCalculateVo.calculateInfo.startDay"
                type="date"
                placeholder="选择日期"
                :style="{width: '100%'}"
              >
              </el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="停歇期"
              prop="breakPeriod"
            >
              <el-select
                v-model="ruleForm.rentCalculateVo.calculateInfo.breakPeriod"
                style="width: 130px"
                multiple
                :style="{width: '100%'}"
                collapse-tags
                :multiple-limit="5"
                :disabled="ruleForm.rentCalculateVo.calculateInfo.repaymentCycle !== 'MONTHLY'"
              >
                <el-option
                  v-for="item in breakPeriodOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="还款方式"
              prop="repaymentMethod"
            >
              <el-select
                v-model="ruleForm.rentCalculateVo.calculateInfo.repaymentMethod"
                :style="{width: '100%'}"
              >
                <el-option
                  v-for="item in repaymentMethodOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="名义收益率"
              prop="nominalInterestRate"
            >
              <el-input
                v-model="ruleForm.rentCalculateVo.calculateInfo.nominalInterestRate"
                placeholder="请输入名义收益率"
                clearable
                :style="{width: '100%'}"
              >
                <i slot="suffix">%</i>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="保证金抵扣方式"
              prop="marginDeductionMethod"
            >
              <el-select
                v-model="ruleForm.rentCalculateVo.calculateInfo.marginDeductionMethod"
                :style="{width: '100%'}"
                :disabled="true"
              >
                <el-option
                  v-for="item in marginDeductionMethodOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="还租时点"
              prop="rentPaymentTiming"
            >
              <el-select
                v-model="ruleForm.rentCalculateVo.calculateInfo.rentPaymentTiming"
                :style="{width: '100%'}"
              >
                <el-option
                  v-for="item in rentPaymentTimingOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col
            :span="6"
            v-if="shouldDisplay('feeTaxRate')"
          >
            <el-form-item
              label="手续费税率"
              prop="feeTaxRate"
            >
              <el-select
                v-model="ruleForm.rentCalculateVo.calculateInfo.feeTaxRate"
                :style="{width: '100%'}"
              >
                <el-option
                  v-for="item in feeTaxRateOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="租赁方式"
              prop="leasingMethod"
            >
              <el-select
                v-model="ruleForm.rentCalculateVo.calculateInfo.leasingMethod"
                :style="{width: '100%'}"
                :disabled="true"
              >
                <el-option
                  v-for="item in leasingMethodOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="首付款"
              prop="downPayment"
            >
              <!-- <div style="display:flex"> -->
              <el-input
                v-model="ruleForm.rentCalculateVo.calculateInfo.downPayment"
                placeholder="请输入首付款"
                clearable
                :style="{width: '92%'}"
              >
                <i slot="suffix">{{formatDownPayment}}</i>
              </el-input>
              <!-- <img src="@/assets/images/lightning.svg" style="width: 20px;height: 32px;margin-left: 6px;" @click="ratioCalculatorFn('SFK')" alt="light"> -->
              <el-tooltip
                class="item"
                effect="dark"
                content="比例计算"
                placement="top"
              >
                <i
                  class="el-icon-s-operation"
                  style="margin-left: 6px;"
                  @click="ratioCalculatorFn('SFK')"
                ></i>
              </el-tooltip>
              <!-- </div> -->
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="首付款比例"
              prop="downPaymentPercentage"
            >
              <el-input
                v-model="downPaymentPercentage"
                placeholder="请输入首付款比例"
                :disabled="true"
                :style="{width: '100%'}"
              >
                <i slot="suffix">%</i>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="保证金"
              prop="margin"
            >
              <!-- <div style="display:flex"> -->
              <el-input
                v-model="ruleForm.rentCalculateVo.calculateInfo.margin"
                placeholder="请输入保证金"
                clearable
                :style="{width: '92%'}"
              >
                <i slot="suffix">{{formatMargin}}</i>
              </el-input>
              <!-- <img src="@/assets/images/lightning.svg" style="width: 20px;height: 32px;margin-left: 6px;" @click="ratioCalculatorFn('BZJ')" alt="light"> -->
              <el-tooltip
                class="item"
                effect="dark"
                content="比例计算"
                placement="top"
              >
                <i
                  class="el-icon-s-operation"
                  style="margin-left: 6px;"
                  @click="ratioCalculatorFn('BZJ')"
                ></i>
              </el-tooltip>
              <!-- </div> -->
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="保证金比例"
              prop="marginPercentage"
            >
              <el-input
                v-model="marginPercentage"
                placeholder="请输入保证金比例"
                clearable
                :style="{width: '100%'}"
                :disabled="true"
              >
                <i slot="suffix">%</i>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="手续费"
              prop="fees"
            >
              <el-input
                v-model="ruleForm.rentCalculateVo.calculateInfo.fees"
                placeholder="请输入手续费"
                clearable
                :style="{width: '100%'}"
              >
                <i slot="suffix">{{formatFees}}</i>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item
              label="手续费率(年)"
              prop="feeRatePerYear"
            >
              <el-input
                v-model="feeRatePerYear"
                placeholder="请输入手续费率"
                clearable
                :style="{width: '100%'}"
                :disabled="true"
              >
                <i slot="suffix">%</i>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col
            :span="6"
            v-if="shouldDisplay('capitalCostRate')"
          >
            <el-form-item
              label="资金成本率"
              prop="capitalCostRate"
            >
              <el-input
                v-model="ruleForm.rentCalculateVo.calculateInfo.capitalCostRate"
                placeholder="请输入资金成本率"
                clearable
                :style="{width: '100%'}"
              >
                <i slot="suffix">%</i>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col
            :span="6"
            v-if="shouldDisplay('otherIncomeTaxIncluded')"
          >
            <el-form-item
              label="其他收入(含税)"
              prop="otherIncomeTaxIncluded"
            >
              <el-input
                v-model="ruleForm.rentCalculateVo.calculateInfo.otherIncomeTaxIncluded"
                placeholder="请输入其他收入"
                clearable
                :style="{width: '100%'}"
              >
                <i slot="suffix">{{formatOtherIncomeTaxIncluded}}</i>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col
            :span="6"
            v-if="shouldDisplay('lessorOtherCosts')"
          >
            <el-form-item
              label="出租人其他成本(月)"
              prop="lessorOtherCosts"
            >
              <el-input
                v-model="ruleForm.rentCalculateVo.calculateInfo.lessorOtherCosts"
                placeholder="请输入出租人其他成本"
                clearable
              >
                <i slot="suffix">{{formatLessorOtherCosts}}</i>
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <div style="margin-top: 10px; display: flex; justify-content: center;">
          <el-button
            type="primary"
            size="small"
            @click="handleImitateOpen"
            :disabled="false"
          >模拟计算</el-button>
        </div>
      </div>
    </el-card>
    <!-- 项目是否有账期 -->
    <el-card class="box-card">
      <div class="box">
        <div class="title">项目账期</div>
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="项目是否有账期">
              <el-radio-group v-model="ruleForm.projectBasicVo.hasDeadline">
                <el-radio label="0">否</el-radio>
                <el-radio label="1">是</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col
            :span="8"
            v-if="ruleForm.projectBasicVo.hasDeadline == 1"
          >
            <el-form-item
              label="账期时间"
              prop="fees"
            >
              <el-input
                v-model="ruleForm.projectBasicVo.hasDeadlineDays"
                placeholder="请输入账期时间"
                clearable
                :style="{width: '100%'}"
              >
                <i slot="suffix">天</i>
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
    </el-card>
    <!-- 融资清单资料 -->
    <el-card class="box-card">
      <div class="box">
        <div class="title">
          <span>
            融资清单资料 {{fileTemplate["finance_lease_data_list"]?.remark}}
            <el-link
              style="font-size: 19px;"
              type="primary"
              @click="downloadTemplateFile(fileTemplate['finance_lease_data_list'].value)"
            >模板下载</el-link>
          </span>
          <el-button
            @click="addFileList(ruleForm.fileVo.FINANCING)"
            class="tz-icon-add"
            type="primary"
            size="small"
          >新增</el-button>
        </div>
        <el-table
          :data="ruleForm.fileVo.FINANCING"
          style="width: 100%; margin-bottom: 20px"
        >
          <el-table-column
            label="序号"
            width="80"
          >
            <template #default="scope">{{ scope.$index + 1 }}</template>
          </el-table-column>
          <el-table-column
            label="附件名称"
            prop="fileName"
          >
            <template #default="{row}">
              <el-input
                v-model="row.fileName"
                placeholder="请输入附件名称"
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column
            label="附件说明"
            prop="fileRemark"
          >
            <template #default="{row}">
              <el-input
                v-model="row.fileRemark"
                placeholder="请输入附件说明"
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column
            label="附件上传"
            prop="fileDesc"
          >
            <template #default="scope">
              <el-upload
                class="upload-demo"
                :ref="'uploadFile' + '1'  + '_' + scope.$index"
                :accept="fileAccept"
                :action="uploadFileUrl + '/file/saveFile'"
                :before-upload="beforeUpload"
                :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '1'  + '_' + scope.$index)"
                :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                :file-list="scope.row.fileList"
                :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                :multiple="false"
                :auto-upload="true"
              >
                <el-button
                  size="small"
                  type="primary"
                  class="el-icon-upload2"
                ></el-button>
              </el-upload>
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            width="120"
          >
            <template #default="scope">
              <div style="display: flex; justify-content: space-around;">
                <el-link
                  type="danger"
                  size="mini"
                  v-if="options.docPermission.commonAreaEdit"
                  @click="deleteFileList(ruleForm.fileVo.FINANCING, scope.$index)"
                >删除</el-link>
                <el-link
                  type="primary"
                  size="mini"
                  :disabled="false"
                  v-if="options.docPermission.commonDownloadBtnVis"
                  @click="downloadFile(scope.row)"
                >下载</el-link>
                <el-link
                  type="primary"
                  size="mini"
                  :disabled="false"
                  v-if="options.docPermission.commonDownloadBtnVis"
                  @click="handlePreviewFile({ fileUuid: scope.row.fileUuid})"
                >预览</el-link>
              </div>
            </template>
          </el-table-column>
        </el-table>
        <div style="margin-bottom: 10px;">补充说明</div>
        <el-input
          v-model="ruleForm.projectBasicVo.financeingDesc"
          placeholder="请输入补充说明"
          clearable
          type="textarea"
          :autosize="{ minRows: 2, maxRows: 4}"
        ></el-input>
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="box">
        <div class="title">
          <span>
            承租企业近年主要财务指标 {{fileTemplate["financial_indicators"]?.remark}}
            <el-link
              style="font-size: 19px;"
              type="primary"
              @click="downloadTemplateFile(fileTemplate['financial_indicators'].value)"
            >模板下载</el-link>
          </span>
        </div>
        <el-form-item label="附件上传">
          <el-upload
            class="upload-demo"
            ref="uploadFinanceFile"
            :accept="fileAccept"
            :action="uploadFileUrl + '/file/saveFile'"
            :before-upload="beforeUpload"
            :on-change="handleFinanceChange"
            :on-success="handleFinanceSuccess"
            :on-remove="handleFinanceRemove"
            :file-list="financeFile"
            :data="{fileRemark: '', fileuserInfo: ''}"
            :multiple="false"
            :auto-upload="true"
          >
            <el-button
              size="small"
              type="primary"
              class="el-icon-upload2"
            >点击上传</el-button>
            <el-button
              :disabled="false"
              v-if="options.docPermission.commonDownloadBtnVis && this.ruleForm.projectBasicVo.financeFileId"
              size="small"
              type="primary"
              @click="downloadFile({fileUuid: ruleForm.projectBasicVo.financeFileId})"
            >下载</el-button>
            <el-button
              :disabled="false"
              v-if="options.docPermission.commonDownloadBtnVis && this.ruleForm.projectBasicVo.financeFileId"
              size="small"
              type="primary"
              @click="handlePreviewFile({fileUuid: ruleForm.projectBasicVo.financeFileId})"
            >预览</el-button>
          </el-upload>
        </el-form-item>
      </div>
      <div class="box">
        <div class="title">
          <span>
            承租企业近期融资情况 {{fileTemplate["financing_situation"]?.remark}}
            <el-link
              style="font-size: 19px;"
              type="primary"
              @click="downloadTemplateFile(fileTemplate['financing_situation'].value)"
            >模板下载</el-link>
          </span>
        </div>
        <el-form-item label="附件上传">
          <el-upload
            class="upload-demo"
            ref="uploadApplyDescFile"
            :accept="fileAccept"
            :action="uploadFileUrl + '/file/saveFile'"
            :before-upload="beforeUpload"
            :on-change="handleApplyDescChange"
            :on-success="handleApplySuccess"
            :on-remove="handleApplyDescRemove"
            :file-list="applyFile"
            :data="{fileRemark: '', fileuserInfo: ''}"
            :multiple="false"
            :auto-upload="true"
          >
            <el-button
              size="small"
              type="primary"
              class="el-icon-upload2"
            >点击上传</el-button>
            <el-button
              :disabled="false"
              v-if="options.docPermission.commonDownloadBtnVis && this.ruleForm.projectBasicVo.applyFileId"
              size="small"
              type="primary"
              @click="downloadFile({fileUuid: ruleForm.projectBasicVo.applyFileId})"
            >下载</el-button>
            <el-button
              :disabled="false"
              v-if="options.docPermission.commonDownloadBtnVis && this.ruleForm.projectBasicVo.applyFileId"
              size="small"
              type="primary"
              @click="handlePreviewFile({fileUuid: ruleForm.projectBasicVo.applyFileId})"
            >预览</el-button>
          </el-upload>
        </el-form-item>
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="box">
        <div class="title">
          <span>
            担保信息 {{fileTemplate["finance_lease_guarantee_file"]?.remark}}
            <el-link
              style="font-size: 19px;"
              type="primary"
              @click="downloadTemplateFile(fileTemplate['finance_lease_guarantee_file'].value)"
            >模板下载</el-link>
          </span>
          <el-button
            @click="addFileList(ruleForm.fileVo.GUARANTEE)"
            class="tz-icon-add"
            type="primary"
            size="small"
          >新增</el-button>
        </div>
        <el-row :gutter="10">
          <el-col
            :span="24"
            style="display: flex; align-items: center; height: 40px;"
          >
            担保方式：
            <el-checkbox-group
              v-model="ruleForm.projectBasicVo.guaraWay"
              style="width: 600px;"
            >
              <el-checkbox label="01">保证</el-checkbox>
              <el-checkbox label="02">抵押</el-checkbox>
              <el-checkbox label="03">质押</el-checkbox>
              <el-checkbox label="04">回购</el-checkbox>
              <el-checkbox label="05">其他</el-checkbox>
            </el-checkbox-group>
          </el-col>
        </el-row>
        <el-table
          :data="ruleForm.fileVo.GUARANTEE"
          style="width: 100%; margin-bottom: 20px"
        >
          <el-table-column
            label="序号"
            width="80"
          >
            <template #default="scope">{{ scope.$index + 1 }}</template>
          </el-table-column>
          <el-table-column
            label="附件名称"
            prop="fileName"
          >
            <template #default="{row}">
              <el-input
                v-model="row.fileName"
                placeholder="请输入附件名称"
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column
            label="附件说明"
            prop="fileRemark"
          >
            <template #default="{row}">
              <el-input
                v-model="row.fileRemark"
                placeholder="请输入附件说明"
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column
            label="附件上传"
            prop="fileDesc"
          >
            <template #default="scope">
              <el-upload
                class="upload-demo"
                :ref="'uploadFile' + '2'  + '_' + scope.$index"
                :accept="fileAccept"
                :action="uploadFileUrl + '/file/saveFile'"
                :before-upload="beforeUpload"
                :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '2'  + '_' + scope.$index)"
                :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                :file-list="scope.row.fileList"
                :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                :multiple="false"
                :auto-upload="true"
              >
                <el-button
                  size="small"
                  type="primary"
                  class="el-icon-upload2"
                ></el-button>
              </el-upload>
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            width="150"
          >
            <template #default="scope">
              <div style="display: flex; justify-content: space-around;">
                <el-link
                  type="danger"
                  size="mini"
                  v-if="options.docPermission.commonAreaEdit"
                  @click="deleteFileList(ruleForm.fileVo.GUARANTEE, scope.$index)"
                >删除</el-link>
                <el-link
                  type="primary"
                  size="mini"
                  :disabled="false"
                  v-if="options.docPermission.commonDownloadBtnVis"
                  @click="downloadFile(scope.row)"
                >下载</el-link>
                <el-link
                  type="primary"
                  size="mini"
                  :disabled="false"
                  v-if="options.docPermission.commonDownloadBtnVis"
                  @click="handlePreviewFile({fileUuid: scope.row.fileUuid})"
                >预览</el-link>
              </div>
            </template>
          </el-table-column>
        </el-table>
        <div style="margin-bottom: 10px;">补充说明</div>
        <el-input
          v-model="ruleForm.projectBasicVo.guaraDesc"
          placeholder="请输入补充说明"
          clearable
          type="textarea"
          :autosize="{ minRows: 2, maxRows: 4}"
        ></el-input>
      </div>
    </el-card>
    <!-- 担保人 -->
    <el-card class="box-card">
      <div class="box">
        <div class="title">
          <div>担保人</div>
          <el-button
            class="tz-icon-add"
            type="primary"
            size="small"
            @click="addBondsmanFn()"
          >添加担保人</el-button>
        </div>
        <el-table
          :data="ruleForm.projectGuarantorVOS"
          style="width: 100%; margin-bottom: 20px"
        >
          <el-table-column
            label="担保人名称"
            width="300"
            prop="customerName"
          ></el-table-column>
          <el-table-column
            label="担保人类型"
            width="150"
            prop="customerType"
          >
            <template #default="{row}">
              {{ row.customerType === '01' ? '法人' : '自然人' }}
            </template>
          </el-table-column>
          <el-table-column
            label="证件号码"
            width="200"
            prop="customerCreditcode"
          >
            <template #default="{row}">
              {{ row.customerType === '01' ? row.creditCode : row.customerCreditcode }}
            </template>
          </el-table-column>
          <el-table-column
            label="地址"
            prop="address"
          >
            <template #default="{row}">
              {{ row.customerType === '01' ? row.companyAddress : row.addressInfoList?row.addressInfoList[0].detailAddress :'' }}
            </template>
          </el-table-column>
          <el-table-column
            label="电话"
            width="150"
            prop="phone"
          >
            <template #default="{row}">
              {{ row.customerType === '01' ? row.companyTel : row.customerPhone }}
            </template>
          </el-table-column>
          <el-table-column
            label="电子邮箱"
            prop="email"
            width="200"
          >
            <template #default="{row}">
              {{ row.customerType === '01' ? row.addressInfoList[0].recipEmail : row.addressInfoList[0].recipEmail  }}
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            width="150"
          >
            <template #default="scope">
              <el-link
                type="danger"
                @click="addBondsmanDelete(scope.$index, 'projectGuarantorVOS')"
                v-if="options.docPermission.commonAreaEdit"
              >删除</el-link>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="box">
        <div class="title">项目说明</div>
        <el-input
          v-model="ruleForm.projectBasicVo.projectDesc"
          placeholder="请输入补充说明"
          clearable
          type="textarea"
          :autosize="{ minRows: 2, maxRows: 4}"
        ></el-input>
      </div>
    </el-card>
    <el-card class="box-card">
      <div class="box">
        <div class="title">
          其他补充资料
          <el-button
            @click="addFileList(ruleForm.fileVo.OTHER)"
            class="tz-icon-add"
            type="primary"
            size="small"
          >新增</el-button>
        </div>
        <el-table
          :data="ruleForm.fileVo.OTHER"
          style="width: 100%; margin-bottom: 20px"
        >
          <el-table-column
            label="序号"
            width="80"
          >
            <template #default="scope">{{ scope.$index + 1 }}</template>
          </el-table-column>
          <el-table-column
            label="附件名称"
            prop="fileName"
          >
            <template #default="{row}">
              <el-input
                v-model="row.fileName"
                placeholder="请输入附件名称"
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column
            label="附件说明"
            prop="fileRemark"
          >
            <template #default="{row}">
              <el-input
                v-model="row.fileRemark"
                placeholder="请输入附件说明"
              ></el-input>
            </template>
          </el-table-column>
          <el-table-column
            label="附件上传"
            prop="fileDesc"
          >
            <template #default="scope">
              <el-upload
                class="upload-demo"
                :ref="'uploadFile' + '3'  + '_' + scope.$index"
                :accept="fileAccept"
                :action="uploadFileUrl + '/file/saveFile'"
                :before-upload="beforeUpload"
                :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '3'  + '_' + scope.$index)"
                :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                :file-list="scope.row.fileList"
                :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                :multiple="false"
                :auto-upload="true"
              >
                <el-button
                  size="small"
                  type="primary"
                  class="el-icon-upload2"
                ></el-button>
              </el-upload>
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            width="120"
          >
            <template #default="scope">
              <div style="display: flex; justify-content: space-around;">
                <el-link
                  type="danger"
                  size="mini"
                  v-if="options.docPermission.commonAreaEdit"
                  @click="deleteFileList(ruleForm.fileVo.OTHER, scope.$index)"
                >删除</el-link>
                <el-link
                  type="primary"
                  size="mini"
                  :disabled="false"
                  v-if="options.docPermission.commonDownloadBtnVis"
                  @click="downloadFile(scope.row)"
                >下载</el-link>
                <el-link
                  type="primary"
                  size="mini"
                  :disabled="false"
                  v-if="options.docPermission.commonDownloadBtnVis"
                  @click="handlePreviewFile({fileUuid: scope.row.fileUuid})"
                >预览</el-link>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>

      <div
        class="box"
        v-if="options.docPermission.commonAreaEdit"
      >
        <el-form-item
          label="下一节点审批人"
          prop="targetUserName"
        >
          <el-radio-group v-model="ruleForm.targetUserName">
            <el-radio
              :label="item.userName"
              v-for="item in approveList"
              :key="item.userName"
            >{{ item.nickName }}</el-radio>
          </el-radio-group>
        </el-form-item>
      </div>

      <div
        style="text-align: right"
        v-if="options.docPermission.commonAreaEdit"
      >
        <el-button
          type="primary"
          @click="handleSubmit('0')"
        >保存草稿</el-button>
        <el-button
          type="primary"
          @click="handleSubmit('1')"
        >确认提交</el-button>
      </div>

      <el-form
        label-width="80px"
        v-if="options.docPermission.factoryVis"
        :disabled="!options.docPermission.factoryEdit"
      >
        <div class="box">
          <span style="color: #F56C6C;margin-right: 4px;">*</span>
          <el-checkbox
            style="color: black;"
            v-model="ruleForm.factoryChecked"
          >我厂已知晓并同意本项目的xxxx,我厂承诺xxxxxxxx</el-checkbox>
          <div class="title">
            细审报告
            <el-button
              @click="addFileList(ruleForm.fileVo.REVIEW_REPORT)"
              class="tz-icon-add"
              type="primary"
              size="small"
            >新增</el-button>
          </div>
          <el-table
            :data="ruleForm.fileVo.REVIEW_REPORT"
            style="width: 100%; margin-bottom: 20px"
          >
            <el-table-column
              label="序号"
              width="80"
            >
              <template #default="scope">{{ scope.$index + 1 }}</template>
            </el-table-column>
            <el-table-column
              label="附件名称"
              prop="fileName"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileName"
                  placeholder="请输入附件名称"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件说明"
              prop="fileRemark"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileRemark"
                  placeholder="请输入附件说明"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件上传"
              prop="fileDesc"
            >
              <template #default="scope">
                <el-upload
                  class="upload-demo"
                  :ref="'uploadFile' + '4'  + '_' + scope.$index"
                  :accept="fileAccept"
                  :action="uploadFileUrl + '/file/saveFile'"
                  :before-upload="beforeUpload"
                  :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                  :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '4'  + '_' + scope.$index)"
                  :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                  :file-list="scope.row.fileList"
                  :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                  :multiple="false"
                  :auto-upload="true"
                >
                  <el-button
                    size="small"
                    type="primary"
                    class="el-icon-upload2"
                  ></el-button>
                </el-upload>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              width="120"
            >
              <template #default="scope">
                <div style="display: flex; justify-content: space-around;">
                  <el-link
                    type="danger"
                    size="mini"
                    v-if="options.docPermission.factoryEdit"
                    @click="deleteFileList(ruleForm.fileVo.REVIEW_REPORT, scope.$index)"
                  >删除</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.factoryDownloadBtnVis"
                    @click="downloadFile(scope.row)"
                  >下载</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.factoryDownloadBtnVis"
                    @click="handlePreviewFile({fileUuid: scope.row.fileUuid})"
                  >预览</el-link>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-form>
      <el-form
        label-width="80px"
        v-if="options.docPermission.companyVis"
        :disabled="!options.docPermission.companyEdit"
      >
        <!-- <div class="box">
          <div class="title">客户评分授信</div>
          <div style="background-color: #E8F3FC; padding: 10px; border-radius: 2px; font-size: 12px; margin-bottom: 20px;">
            {{this.ruleForm.custName}}<br>
            授信额度：{{this.ruleForm.customerCreditInfo.creditLimit}}，剩余授信额度：{{this.ruleForm.customerCreditInfo.availableLimit}}(含本项目)<br>
            上次尽调日期：{{this.ruleForm.customerCreditInfo.availableBeginTime}} 有效期至：{{this.ruleForm.customerCreditInfo.availableEndTime}}
          </div>
        </div> -->

        <div class="box">
          <div class="title">
            尽职调查
          </div>
          <el-form-item label="尽调结论">
            <el-input v-model="ruleForm.conclusion" />
          </el-form-item>
          <el-form-item label="建议">
            <el-input v-model="ruleForm.proposal" />
          </el-form-item>
          <el-button
            @click="addFileList(ruleForm.fileVo.INVESTIGATION)"
            class="tz-icon-add"
            type="primary"
            size="small"
            style="float: right;"
          >新增</el-button>
          <el-table
            :data="ruleForm.fileVo.INVESTIGATION"
            style="width: 100%; margin-bottom: 20px"
          >
            <el-table-column
              label="序号"
              width="80"
            >
              <template #default="scope">{{ scope.$index + 1 }}</template>
            </el-table-column>
            <el-table-column
              label="附件名称"
              prop="fileName"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileName"
                  placeholder="请输入附件名称"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件说明"
              prop="fileRemark"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileRemark"
                  placeholder="请输入附件说明"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件上传"
              prop="fileDesc"
            >
              <template #default="scope">
                <el-upload
                  class="upload-demo"
                  :ref="'uploadFile' + '5'  + '_' + scope.$index"
                  :accept="fileAccept"
                  :action="uploadFileUrl + '/file/saveFile'"
                  :before-upload="beforeUpload"
                  :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                  :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '5'  + '_' + scope.$index)"
                  :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                  :file-list="scope.row.fileList"
                  :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                  :multiple="false"
                  :auto-upload="true"
                >
                  <el-button
                    size="small"
                    type="primary"
                    class="el-icon-upload2"
                  ></el-button>
                </el-upload>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              width="120"
            >
              <template #default="scope">
                <div style="display: flex; justify-content: space-around;">
                  <el-link
                    type="danger"
                    size="mini"
                    v-if="options.docPermission.companyEdit"
                    @click="deleteFileList(ruleForm.fileVo.INVESTIGATION, scope.$index)"
                  >删除</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.companyDownloadBtnVis"
                    @click="downloadFile(scope.row)"
                  >下载</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.companyDownloadBtnVis"
                    @click="handlePreviewFile({fileUuid: scope.row.fileUuid})"
                  >预览</el-link>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>

        <div class="box">
          <div class="title">
            中登网信息
            <el-button
              @click="addFileList(ruleForm.fileVo.ZHONGDENG)"
              class="tz-icon-add"
              type="primary"
              size="small"
            >新增</el-button>
          </div>
          <el-table
            :data="ruleForm.fileVo.ZHONGDENG"
            style="width: 100%; margin-bottom: 20px"
          >
            <el-table-column
              label="序号"
              width="80"
            >
              <template #default="scope">{{ scope.$index + 1 }}</template>
            </el-table-column>
            <el-table-column
              label="附件名称"
              prop="fileName"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileName"
                  placeholder="请输入附件名称"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件说明"
              prop="fileRemark"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileRemark"
                  placeholder="请输入附件说明"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件上传"
              prop="fileDesc"
            >
              <template #default="scope">
                <el-upload
                  class="upload-demo"
                  :ref="'uploadFile' + '6'  + '_' + scope.$index"
                  :accept="fileAccept"
                  :action="uploadFileUrl + '/file/saveFile'"
                  :before-upload="beforeUpload"
                  :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                  :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '6'  + '_' + scope.$index)"
                  :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                  :file-list="scope.row.fileList"
                  :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                  :multiple="false"
                  :auto-upload="true"
                >
                  <el-button
                    size="small"
                    type="primary"
                    class="el-icon-upload2"
                  ></el-button>
                </el-upload>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              width="120"
            >
              <template #default="scope">
                <div style="display: flex; justify-content: space-around;">
                  <el-link
                    type="danger"
                    size="mini"
                    v-if="options.docPermission.companyEdit"
                    @click="deleteFileList(ruleForm.fileVo.ZHONGDENG, scope.$index)"
                  >删除</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.companyDownloadBtnVis"
                    @click="downloadFile(scope.row)"
                  >下载</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.companyDownloadBtnVis"
                    @click="handlePreviewFile({fileUuid: scope.row.fileUuid})"
                  >预览</el-link>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>

        <div class="box">
          <div class="title">
            收益测算报告
            <el-button
              @click="addFileList(ruleForm.fileVo.CALCULATION_REPORT)"
              class="tz-icon-add"
              type="primary"
              size="small"
            >新增</el-button>
          </div>
          <el-table
            :data="ruleForm.fileVo.CALCULATION_REPORT"
            style="width: 100%; margin-bottom: 20px"
          >
            <el-table-column
              label="序号"
              width="80"
            >
              <template #default="scope">{{ scope.$index + 1 }}</template>
            </el-table-column>
            <el-table-column
              label="附件名称"
              prop="fileName"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileName"
                  placeholder="请输入附件名称"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件说明"
              prop="fileRemark"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileRemark"
                  placeholder="请输入附件说明"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件上传"
              prop="fileDesc"
            >
              <template #default="scope">
                <el-upload
                  class="upload-demo"
                  :ref="'uploadFile' + '7'  + '_' + scope.$index"
                  :accept="fileAccept"
                  :action="uploadFileUrl + '/file/saveFile'"
                  :before-upload="beforeUpload"
                  :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                  :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '7'  + '_' + scope.$index)"
                  :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                  :file-list="scope.row.fileList"
                  :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                  :multiple="false"
                  :auto-upload="true"
                >
                  <el-button
                    size="small"
                    type="primary"
                    class="el-icon-upload2"
                  ></el-button>
                </el-upload>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              width="120"
            >
              <template #default="scope">
                <div style="display: flex; justify-content: space-around;">
                  <el-link
                    type="danger"
                    size="mini"
                    v-if="options.docPermission.companyEdit"
                    @click="deleteFileList(ruleForm.fileVo.CALCULATION_REPORT, scope.$index)"
                  >删除</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.companyDownloadBtnVis"
                    @click="downloadFile(scope.row)"
                  >下载</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.companyDownloadBtnVis"
                    @click="handlePreviewFile({fileUuid: scope.row.fileUuid})"
                  >预览</el-link>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-form>

      <el-form
        v-if="options.docPermission.legalVis"
        :disabled="!options.docPermission.legalEdit"
      >
        <div class="box">
          <div class="title">
            法务稽核报告
            <el-button
              @click="addFileList(ruleForm.fileVo.AUDIT_REPORT)"
              class="tz-icon-add"
              type="primary"
              size="small"
            >新增</el-button>
          </div>
          <el-table
            :data="ruleForm.fileVo.AUDIT_REPORT"
            style="width: 100%; margin-bottom: 20px"
          >
            <el-table-column
              label="序号"
              width="80"
            >
              <template #default="scope">{{ scope.$index + 1 }}</template>
            </el-table-column>
            <el-table-column
              label="附件名称"
              prop="fileName"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileName"
                  placeholder="请输入附件名称"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件说明"
              prop="fileRemark"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileRemark"
                  placeholder="请输入附件说明"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件上传"
              prop="fileDesc"
            >
              <template #default="scope">
                <el-upload
                  class="upload-demo"
                  :ref="'uploadFile' + '8'  + '_' + scope.$index"
                  :accept="fileAccept"
                  :action="uploadFileUrl + '/file/saveFile'"
                  :before-upload="beforeUpload"
                  :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                  :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '8'  + '_' + scope.$index)"
                  :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                  :file-list="scope.row.fileList"
                  :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                  :multiple="false"
                  :auto-upload="true"
                >
                  <el-button
                    size="small"
                    type="primary"
                    class="el-icon-upload2"
                  ></el-button>
                </el-upload>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              width="120"
            >
              <template #default="scope">
                <div style="display: flex; justify-content: space-around;">
                  <el-link
                    type="danger"
                    size="mini"
                    v-if="options.docPermission.legalEdit"
                    @click="deleteFileList(ruleForm.fileVo.AUDIT_REPORT, scope.$index)"
                  >删除</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.legalDownloadBtnVis"
                    @click="downloadFile(scope.row)"
                  >下载</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.legalDownloadBtnVis"
                    @click="handlePreviewFile({fileUuid: scope.row.fileUuid})"
                  >预览</el-link>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-form>

      <el-form
        v-if="options.docPermission.riskVis"
        :disabled="!options.docPermission.riskEdit"
      >
        <div class="box">
          <div class="title">
            风险审查意见表
            <el-button
              @click="addFileList(ruleForm.fileVo.RISK_REVIEW)"
              class="tz-icon-add"
              type="primary"
              size="small"
            >新增</el-button>
          </div>
          <el-table
            :data="ruleForm.fileVo.RISK_REVIEW"
            style="width: 100%; margin-bottom: 20px"
          >
            <el-table-column
              label="序号"
              width="80"
            >
              <template #default="scope">{{ scope.$index + 1 }}</template>
            </el-table-column>
            <el-table-column
              label="附件名称"
              prop="fileName"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileName"
                  placeholder="请输入附件名称"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件说明"
              prop="fileRemark"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileRemark"
                  placeholder="请输入附件说明"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件上传"
              prop="fileDesc"
            >
              <template #default="scope">
                <el-upload
                  class="upload-demo"
                  :ref="'uploadFile' + '9'  + '_' + scope.$index"
                  :accept="fileAccept"
                  :action="uploadFileUrl + '/file/saveFile'"
                  :before-upload="beforeUpload"
                  :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                  :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '9'  + '_' + scope.$index)"
                  :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                  :file-list="scope.row.fileList"
                  :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                  :multiple="false"
                  :auto-upload="true"
                >
                  <el-button
                    size="small"
                    type="primary"
                    class="el-icon-upload2"
                  ></el-button>
                </el-upload>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              width="120"
            >
              <template #default="scope">
                <div style="display: flex; justify-content: space-around;">
                  <el-link
                    type="danger"
                    size="mini"
                    v-if="options.docPermission.riskEdit"
                    @click="deleteFileList(ruleForm.fileVo.RISK_REVIEW, scope.$index)"
                  >删除</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.riskDownloadBtnVis"
                    @click="downloadFile(scope.row)"
                  >下载</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.riskDownloadBtnVis"
                    @click="handlePreviewFile({fileUuid: scope.row.fileUuid})"
                  >预览</el-link>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-form>

      <el-form
        v-if="options.docPermission.committeeVis"
        :disabled="!options.docPermission.committeeEdit"
      >
        <div class="box">
          <div class="title">
            会议纪要
            <el-button
              @click="addFileList(ruleForm.fileVo.MEETING_MINUTES)"
              class="tz-icon-add"
              type="primary"
              size="small"
            >新增</el-button>
          </div>
          <el-table
            :data="ruleForm.fileVo.MEETING_MINUTES"
            style="width: 100%; margin-bottom: 20px"
          >
            <el-table-column
              label="序号"
              width="80"
            >
              <template #default="scope">{{ scope.$index + 1 }}</template>
            </el-table-column>
            <el-table-column
              label="附件名称"
              prop="fileName"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileName"
                  placeholder="请输入附件名称"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件说明"
              prop="fileRemark"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileRemark"
                  placeholder="请输入附件说明"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件上传"
              prop="fileDesc"
            >
              <template #default="scope">
                <el-upload
                  class="upload-demo"
                  :ref="'uploadFile' + '10'  + '_' + scope.$index"
                  :accept="fileAccept"
                  :action="uploadFileUrl + '/file/saveFile'"
                  :before-upload="beforeUpload"
                  :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                  :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '10'  + '_' + scope.$index)"
                  :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                  :file-list="scope.row.fileList"
                  :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                  :multiple="false"
                  :auto-upload="true"
                >
                  <el-button
                    size="small"
                    type="primary"
                    class="el-icon-upload2"
                  ></el-button>
                </el-upload>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              width="120"
            >
              <template #default="scope">
                <div style="display: flex; justify-content: space-around;">
                  <el-link
                    type="danger"
                    size="mini"
                    v-if="options.docPermission.committeeEdit"
                    @click="deleteFileList(ruleForm.fileVo.MEETING_MINUTES, scope.$index)"
                  >删除</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.committeeDownloadBtnVis"
                    @click="downloadFile(scope.row)"
                  >下载</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.committeeDownloadBtnVis"
                    @click="handlePreviewFile({fileUuid: scope.row.fileUuid})"
                  >预览</el-link>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>

        <div class="box">
          <div class="title">
            项目批复书
            <el-button
              @click="addFileList(ruleForm.fileVo.PROJECT_APPROVAL)"
              class="tz-icon-add"
              type="primary"
              size="small"
            >新增</el-button>
          </div>
          <el-table
            :data="ruleForm.fileVo.PROJECT_APPROVAL"
            style="width: 100%; margin-bottom: 20px"
          >
            <el-table-column
              label="序号"
              width="80"
            >
              <template #default="scope">{{ scope.$index + 1 }}</template>
            </el-table-column>
            <el-table-column
              label="附件名称"
              prop="fileName"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileName"
                  placeholder="请输入附件名称"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件说明"
              prop="fileRemark"
            >
              <template #default="{row}">
                <el-input
                  v-model="row.fileRemark"
                  placeholder="请输入附件说明"
                ></el-input>
              </template>
            </el-table-column>
            <el-table-column
              label="附件上传"
              prop="fileDesc"
            >
              <template #default="scope">
                <el-upload
                  class="upload-demo"
                  :ref="'uploadFile' + '11'  + '_' + scope.$index"
                  :accept="fileAccept"
                  :action="uploadFileUrl + '/file/saveFile'"
                  :before-upload="beforeUpload"
                  :on-change="(file, fileList) => handleChange(file, fileList, scope.row)"
                  :on-success="(response, file, fileList) => handleSuccess(response, file, fileList, scope.row, scope.$index, 'uploadFile' + '11'  + '_' + scope.$index)"
                  :on-remove="(file, fileList) => handleRemove(file, fileList, scope.row)"
                  :file-list="scope.row.fileList"
                  :data="{fileRemark: scope.row.fileRemark, fileuserInfo: scope.row.fileName}"
                  :multiple="false"
                  :auto-upload="true"
                >
                  <el-button
                    size="small"
                    type="primary"
                    class="el-icon-upload2"
                  ></el-button>
                </el-upload>
              </template>
            </el-table-column>
            <el-table-column
              label="操作"
              width="120"
            >
              <template #default="scope">
                <div style="display: flex; justify-content: space-around;">
                  <el-link
                    type="danger"
                    size="mini"
                    v-if="options.docPermission.committeeEdit"
                    @click="deleteFileList(ruleForm.fileVo.PROJECT_APPROVAL, scope.$index)"
                  >删除</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.committeeDownloadBtnVis"
                    @click="downloadFile(scope.row)"
                  >下载</el-link>
                  <el-link
                    type="primary"
                    size="mini"
                    :disabled="false"
                    v-if="options.docPermission.committeeDownloadBtnVis"
                    @click="handlePreviewFile({fileUuid: scope.row.fileUuid})"
                  >预览</el-link>
                </div>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-form>
    </el-card>
    <RentCalculation ref="rentCalculationRef"></RentCalculation>
    <RatioCalculator
      ref="RatioCalculatorRef"
      @ok="RatioCalculatorOkFn"
    ></RatioCalculator>

    <AgentTable
      ref="agentTableRef"
      @ok="handleAgentOk"
    ></AgentTable>
    <AddBondsman
      :templateName="templateName"
      :queryData="queryData"
      ref="addBondsmanRef"
      @ok="addBondsmanOk"
    ></AddBondsman>
    <CustomTable
      :templateName="templateName"
      :queryData="queryDataKH"
      ref="customTableRef"
      @ok="handleCustOk"
    ></CustomTable>
    <EquipmentTable
      ref="equipmentTableRef"
      @ok="handleEquipmentOk"
    ></EquipmentTable>
    <CustomerBankDialog
      ref="customerBankRef"
      @ok="handleCustomerBankOk"
    />
    <PreviewFile
      :fileType="fileType"
      :fileUrl="fileUrl"
      :dialogVisible="dialogFileVisible"
      @cancel="dialogFileVisible = false"
    />
  </el-form>
</template>

<script>
import RatioCalculator from "./components/RatioCalculator"
import AgentTable from './AgentTable'
import AddBondsman from "./AddBondsman"
import CustomTable from "./CustomTable"
import EquipmentTable from './EquipmentTable'
import HskAddressSel from '@/components/area/index.vue'
import RentCalculation from "./RentCalculation"
import enumMixins from './enumMixins'
import { getNodeUsers, queryFiles, getCompanyList, customerCreditInfo, configCreditLevelList, removeCustomerBank, allCustomerBank, getSimpleFileInfo,customerEdit,customerInfo,customerAdmitInfo } from '@/api/processManage/approveForms'
import { getDownload } from '@/utils/request'
import { mapState } from "vuex";
import { formatMoney, numToChinaNumerals, previewFile, downloadFile, ZDWdownloadFile } from "@/utils/utils"
import CustomerBankDialog from "./components/CustomerBankDialog.vue";
import PreviewFile from '@/components/PreviewFile/index'

import { validatePhone, validateEmail, validateNumber } from '@/utils/validate'
export default {
  dicts: ['sys_file_template', 'enabled_file_upload_types', 'sys_rent', 'sys_user_sex', 'sys_nation', 'sys_education'],
  props: ['templateId', 'doc', 'flowNo', 'flowInfo', 'options', 'templateName', 'templateType'],
  components: {
    AgentTable,
    AddBondsman,
    CustomTable,
    EquipmentTable,
    HskAddressSel,
    RentCalculation,
    RatioCalculator,
    CustomerBankDialog,
    PreviewFile
  },
  mixins: [enumMixins],
  computed: {
    // 计算首付款比例(首付款/合同价款)
    downPaymentPercentage() {
      if (this.ruleForm.rentCalculateVo.calculateInfo.downPayment && this.ruleForm.rentCalculateVo.calculateInfo.leasingPrice) {
        return parseFloat(((this.ruleForm.rentCalculateVo.calculateInfo.downPayment / this.ruleForm.rentCalculateVo.calculateInfo.leasingPrice) * 100).toFixed(2))
      }
      return undefined
    },
    // 计算保证金比例(保证金/合同价款)
    marginPercentage() {
      if (this.ruleForm.rentCalculateVo.calculateInfo.margin && this.ruleForm.rentCalculateVo.calculateInfo.leasingPrice) {
        return parseFloat(((this.ruleForm.rentCalculateVo.calculateInfo.margin / this.ruleForm.rentCalculateVo.calculateInfo.leasingPrice) * 100).toFixed(2))
      }
      return undefined
    },
    // 计算手续费率(年)(手续费/合同价款)
    feeRatePerYear() {
      if (this.ruleForm.rentCalculateVo.calculateInfo.fees && this.ruleForm.rentCalculateVo.calculateInfo.leasingPrice) {
        return parseFloat(((this.ruleForm.rentCalculateVo.calculateInfo.fees) / parseFloat(this.ruleForm.rentCalculateVo.calculateInfo.leasingPrice) * 100).toFixed(2))
      }
      return undefined
    },
    ...mapState({
      username: state => state.user.name
    }),
    formatLeasingPrice() {
      return numToChinaNumerals(this.ruleForm.rentCalculateVo.calculateInfo.leasingPrice)
    },
    formatDownPayment() {
      return numToChinaNumerals(this.ruleForm.rentCalculateVo.calculateInfo.downPayment)
    },
    formatMargin() {
      return numToChinaNumerals(this.ruleForm.rentCalculateVo.calculateInfo.margin)
    },
    formatFees() {
      return numToChinaNumerals(this.ruleForm.rentCalculateVo.calculateInfo.fees)
    },
    formatOtherIncomeTaxIncluded() {
      return numToChinaNumerals(this.ruleForm.rentCalculateVo.calculateInfo.otherIncomeTaxIncluded)
    },
    formatLessorOtherCosts() {
      return numToChinaNumerals(this.ruleForm.rentCalculateVo.calculateInfo.lessorOtherCosts)
    }
  },
  data() {
    return {
      customerList: [],
      totalPrice: '',
      clientAdmittanceMsgShow: true,//客户准入信息是否展开详情
      clientBasicsMsgShow: true,//客户基础信息是否展开详情
      dictSys_rent: [],
      uploadFileUrl: process.env.VUE_APP_BASE_API,
      approveList: [],
      hrefn: require("@/assets/images/space.png"),
      ruleForm: {
        hrefn: require("@/assets/images/space.png"),
        frontFn: require("@/assets/images/space.png"),
        backFn: require("@/assets/images/space.png"),
        assetCondition: '',
        assetConditionFile: '',
        assetConditionFileList: [{ fileList: [], fileName: '', fileRemark: '', fileUuid: '' }],

        companyCondition: '',
        companyConditionFile: '',
        companyConditionFileList: [{ fileList: [], fileName: '', fileRemark: '', fileUuid: '' }],

        creditInfo: '',
        creditCondition: '',
        creditConditionFile: '',
        creditConditionFileList: [{ fileList: [], fileName: '', fileRemark: '', fileUuid: '' }],

        surveyCondition: '',
        surveyConditionFile: '',
        surveyConditionFileList: [{ fileList: [], fileName: '', fileRemark: '', fileUuid: '' }],

        guranteeCondition: '',
        guranteeConditionFile: '',
        guranteeConditionFileList: [{ fileList: [], fileName: '', fileRemark: '', fileUuid: '' }],

        customerinfoFile: '',
        customerinfoFileList: [{ fileList: [], fileName: '', fileRemark: '', fileUuid: '' }],

        SXPFShow: false,//客户评分授信是否展示
        custName: '',
        custNo: '',
        targetUserName: '',
        bankAccountList: [], // 银行账户信息
        customerAdmitVo: { // 客户准入信息
          customerAdmitInfo: {}
        },
        customerCreditInfo: {}, // 授信评分信息
        configCreditLevelListData: {},//客户资产评分
        equipmentVos: [], // 设备
        // 附件
        fileVo: {
          FINANCING: [], // 融资清单
          GUARANTEE: [], // 担保信息
          OTHER: [], // 其他材料补充
          REVIEW_REPORT: [], // 细审报告
          INVESTIGATION: [], // 尽职调查
          ZHONGDENG: [], // 中登网信息
          CALCULATION_REPORT: [], // 收益测算报告
          AUDIT_REPORT: [], // 法务稽核报告
          RISK_REVIEW: [], // 风险审查意见表
          MEETING_MINUTES: [], // 会议纪要
          PROJECT_APPROVAL: [], // 项目批复书
        },
        projectBasicVo: { // 项目申请基本信息
          agentName: '', // 代理商名称
          applicationFileId: '', // 立项报告
          applyFileId: '', // 承租企业近期融资情况id
          financeFileId: '', // 承租企业近年主要财务指标id
          leaseFileId: '',//融资租赁申请书id
          financeingDesc: '', // 融资清单资料补充说明
          financeingFileId: '',//融资清单id
          guaraDesc: '', // 担保补充说明
          guaraWay: [], // 担保方式
          mailAddr: [], // 邮寄地址
          mailDetailAddr: '', // 邮寄详细地址
          projectAddr: [], // 项目地址
          projectDesc: '', // 项目说明
          recipientName: '', // 收件人名称
          recipientPhone: '', // 收件人电话
          recipEmail: '',//收件人电子邮箱
          networkRuleForm: {
            zdpresenInfo: '',//中登网情况说明
            annexInfoList: [{ fileList: [], fileName: '', fileRemark: '', fileUuid: '' }],//中登网相关附件
          },
          rentType: '01', // 租赁类型
          isFastApprove: '0', // 快速审批
          hasDeadline: '0',//项目是否有账期
          projectBasicVo: '',//账期时间
          invoice_title: '', // 发票抬头
          tax_no: '', // 开票税号
          invoice_address: '', // 开票地址
          invoice_tle: '', // 开票联系电话
          invoice_bank: '', // 开票开户行
          invoice_account: '', // 开票银行账户
          lessorId: null, // 出租方id
          relatedFactoryId: '', // 设备厂商id
          relatedFactoryName: '', // 设备厂商名称
          contractAmount: 0, // 合同金额
        },
        projectGuarantorVOS: [],
        rentCalculateVo: { // 测算基本信息
          calculateInfo: {
            leasingPrice: '', // 合同价款
            leaseTermMonths: 24, // 融资期限(月)
            leasingMethod: 'DIRECT', // 租赁方式
            repaymentMethod: 'EQUAL_PRINCIPAL_AND_INTEREST', // 还款方式
            startDay: undefined, // 起始日
            breakPeriod: undefined, // 停歇期
            repaymentCycle: 'MONTHLY', // 还款周期
            gracePeriodMonths: 2, // 宽限期(月)
            marginDeductionMethod: undefined, // 保证金抵扣方式
            rentPaymentTiming: 'END', // 还租时点
            downPaymentPercentage: undefined, // 首付款比例
            marginPercentage: undefined, // 保证金比例
            feeRatePerYear: undefined, // 手续费率(年)
            feeTaxRate: 6, // 手续费税率
            nominalInterestRate: 10, // 名义收益率
            capitalCostRate: 7, // 资金成本率
            lessorOtherCosts: 0, // 出租人其他成本
            otherIncomeTaxIncluded: 0, // 其他收入(含税)
            downPayment: 0, // 首付款
            margin: 0, // 保证金
            fees: 0, // 手续费
            monthlyPayment: undefined, // 每日支付
          }
        },
        factoryChecked: false, // 工厂审核是否已知晓
        conclusion: '', // 尽调结论
        proposal: '', // 建议
      },
      defaultProjectAddress: [],
      defaultMailAddress: [],
      rules: {
        'customerAdmitVo.customerAdmitInfo.customerName': [{ required: true, message: '请选择客户', trigger: 'change' }],
        targetUserName: [{ required: true, message: '请选择下一节点审批人', trigger: 'blur' }],
        'projectBasicVo.lessorId': [{ required: true, message: '请选择出租方', trigger: 'blur' }],
        'rentCalculateVo.calculateInfo.leasingPrice': [{ required: true, message: '请输入合同价款', trigger: 'blur' }],
        //发票
        'projectBasicVo.invoice_address': [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
        'projectBasicVo.invoice_bank': [{ required: true, message: '请输入开户行', trigger: 'blur' }],
        'projectBasicVo.invoice_account': [
          { required: true, message: '请输入账号', trigger: 'blur' },
          {
            required: true,
            validator: validateNumber,
            trigger: 'blur'
          }],
        'projectBasicVo.invoice_tle': [{ required: true, validator: validatePhone, trigger: 'blur' }],
        //邮寄地址
        'projectBasicVo.mailDetailAddr': [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
        'projectBasicVo.recipientName': [{ required: true, message: '请输入收件人名称', trigger: 'blur' }],
        'projectBasicVo.recipientPhone': [{ required: true, validator: validatePhone, trigger: 'blur' }],
        'projectBasicVo.recipEmail': [{ required: true, validator: validateEmail, trigger: 'blur' }],
        //中登网
        'projectBasicVo.zdpresenInfo': [{ required: true, message: '请输入情况说明', trigger: 'blur' }]
      },
      financeFile: [],
      rzzlFile: [],
      applyFile: [],
      applicationFile: [],
      inputNumShow: 4,
      inputInterval: 10,
      checkList: [],
      imitateShow: false,
      tableKey: 0,
      lessorList: [],
      fileTemplate: {},
      fileAccept: '',
      sexEnum: {
        "0": "男",
        "1": "女",
        "2": "未知",
      },
      creditEnum: {
        "1": "很好",
        "2": "良好",
        "3": "一般",
        "4": "差",
      },
      marriageEnum: {
        "1": "未婚",
        "0": "已婚"
      },

      fileUrl: '',
      fileType: '',
      dialogFileVisible: false,
      queryData: {
        isBondsman: '2',
        // isAdmit:'2',
      },
      queryDataKH: {
        isAdmit: '2',
      },
      addressShow: false
    }
  },
  created() {
    this.dictSys_rent = this.dict.type.sys_rent
    this.handleGetNodeUsers()
    this.getLessor()
  },
  watch: {
    'dict.type.sys_file_template': function (newVal) {
      newVal.forEach(item => {
        item.remark = item.raw.remark
        this.fileTemplate[item.label] = item
      })
    },
    doc: {
      handler(val) {
        console.log('doc',val)
        if (JSON.stringify(val) !== '{}') {
          this.addressShow = true
          let params = JSON.parse(JSON.stringify(val))
          customerInfo({ customerId: val.customerId || val.custNo }).then(res => {
            return customerAdmitInfo(val.customerId || val.custNo).then(ret => ({
              ...res.data,
              ...ret.data
            }));
          }).then(data => {
            this.ruleForm = {
              ...data,
              ...JSON.parse(JSON.stringify(val)),
              customerAdmitVo: {
                customerAdmitInfo: JSON.parse(val.customerAdmitVo.customerAdmitInfo || "{}")
              },
              rentCalculateVo: {
                calculateInfo: JSON.parse(val.rentCalculateVo.calculateInfo || "{}")
              }
            }

            const keys = ['annexInfoList'];
            keys.forEach(key => {
              this.ruleForm.projectBasicVo.networkRuleForm[key] = this.processFileList(this.ruleForm.projectBasicVo.networkRuleForm[key]);
            });
            this.ruleForm.projectBasicVo.invoice_title =  this.ruleForm.customerType === '01' ? this.ruleForm.enterprieName : this.ruleForm.customerName//发票抬头
            this.ruleForm.projectBasicVo.tax_no = this.ruleForm.customerType === '01' ? this.ruleForm.creditCode : ''//发票税号
            this.ruleForm.projectBasicVo.projectAddr = this.ruleForm.projectBasicVo.projectAddr?.split(",")
            this.ruleForm.projectBasicVo.mailAddr = this.ruleForm.projectBasicVo.mailAddr?.split(":")[0].split(",")
            this.ruleForm.projectBasicVo.guaraWay = this.ruleForm.projectBasicVo.guaraWay?.split(",")
            this.defaultProjectAddress = [...this.ruleForm.projectBasicVo.projectAddr] || []
            this.defaultMailAddress = [this.ruleForm.addressInfoList[0].province, this.ruleForm.addressInfoList[0].city, this.ruleForm.addressInfoList[0].area, this.ruleForm.addressInfoList[0].town]
            const keysInfo = ['assetConditionFileList', 'companyConditionFileList', 'creditConditionFileList', 'surveyConditionFileList', 'guranteeConditionFileList', 'customerinfoFileList'];
            keysInfo.forEach(key => {
              this.ruleForm[key] = this.processFileList(params[key]);
            });
            this.handleQueryFiles(this.ruleForm)
          })

        }
        else {
          this.$refs['ruleForm']?.resetFields();
        }
      },
      deep: true
    },
    'dict.type.enabled_file_upload_types': {
      deep: true,
      handler(newValue) {
        if (newValue && newValue.length > 0) {
          this.fileAccept = newValue.map(item => {
            let updatedValue = item.value.split(',').map(item => `.${item}`).join(',');
            return updatedValue;
          }).join(',');
        }
      }
    }
  },
  methods: {
    formatMoney,
    handleAddBankType(type) {
      const list = [
        {
          label: '企业基本户',
          value: '1'
        },
        {
          label: '企业一般户',
          value: '2'
        },
        {
          label: '共管账户',
          value: '3'
        },
        {
          label: '个人账户',
          value: '4'
        },
        {
          label: '其他',
          value: '5'
        },
      ]
      const name = list.filter(item => item.value == type)[0].label || ''
      return name
    },
    shouldDisplay(prop) {
      return this.dictSys_rent.some(item => item.label === prop && item.value === "0");
    },
    //计算比例
    ratioCalculatorFn(text) {
      if (this.ruleForm.rentCalculateVo.calculateInfo.leasingPrice == '') {
        this.$message.error('请先输入合同价款')
      } else {
        let params = {
          text: text,
          leasingPrice: this.ruleForm.rentCalculateVo.calculateInfo.leasingPrice,
        }
        if (text == 'SFK') {
          this.$set(params, 'title', '首付款比例计算')
        }
        if (text == 'BZJ') {
          this.$set(params, 'title', '保证金比例计算')
        }
        this.$refs.RatioCalculatorRef.sync(params)

      }
    },
    RatioCalculatorOkFn(msg) {
      if (msg.text == 'SFK') {
        this.ruleForm.rentCalculateVo.calculateInfo.downPayment = msg.money
      }
      if (msg.text == 'BZJ') {
        this.ruleForm.rentCalculateVo.calculateInfo.margin = msg.money
      }
    },
    //融资租赁申请书上传
    //状态修改
    handleRZZLChange(file, fileList, v) {
      this.rzzlFile.push(file)
      if (this.rzzlFile.length > 0) {
        this.rzzlFile = [fileList[fileList.length - 1]]
      }
      return true
    },
    handleRZZLSuccess(response, file) {
      let uid = file.uid
      let idx = this.$refs.uploadRZZLFile.uploadFiles.findIndex(item => item.uid == uid)
      if (response.code != 200) {
        this.$modal.msgError('文件格式或命名存在特殊字符,请检查后重新上传!');
        this.$refs.uploadRZZLFile.uploadFiles.splice(idx, 1)
        return true;
      }

      this.ruleForm.projectBasicVo.leaseFileId = response.data.fileUuid;
      this.rzzlFile.push(file)
    },
    handleRZZlRemove(file, fileList) {
      this.rzzlFile = fileList
      if (!this.rzzlFile.length) {
        this.ruleForm.projectBasicVo.leaseFileId = ''
      }
    },
    addBondsmanFn() {
      this.$refs.addBondsmanRef.sync()
    },
    addBondsmanOk(row){
      console.log('选择担保人',row)
      if(this.ruleForm.projectGuarantorVOS.length <5){
        let exists = this.ruleForm.projectGuarantorVOS.some(item => item.customerId === row.customerId);
        if (!exists) {
          this.ruleForm.projectGuarantorVOS.push({
            ...row,
          })
        }else{
          this.$modal.msgError('当前用户已是担保人');
        }

      }else{
        this.$modal.msgError('担保人最多可选5位');
      }

    },
    addBondsmanDelete(i, type) {
      this.ruleForm[type].splice(i, 1);
    },
    // 文件下载
    async handleDownloadFile(row) {
      downloadFile({ fileUuid: row.fileUuid });
    },
    // 文件预览
    async handlePreviewFile(row) {
      try {
        const { arrayBuffer, fileType } = await previewFile({ fileUuid: row.fileUuid });
        this.fileUrl = arrayBuffer;
        this.fileType = fileType;
        this.dialogFileVisible = true
      } catch (error) {
        this.$modal.msgError(error.message);
      }
    },
    beforeUpload(file) {
      if (file.size / 1024 / 1024 > 50) {
        this.$message.error('文件不能超过50M！');
        return false;
      }
      return true;
    },
    handleFinanceChange(file, fileList, v) {
      this.financeFile.push(file)
      if (this.financeFile.length > 0) {
        this.financeFile = [fileList[fileList.length - 1]]
      }
      return true
    },
    handleFinanceSuccess(response, file) {
      let uid = file.uid
      let idx = this.$refs.uploadFinanceFile.uploadFiles.findIndex(item => item.uid == uid)
      if (response.code != 200) {
        this.$modal.msgError('文件格式或命名存在特殊字符,请检查后重新上传!');
        this.$refs.uploadFinanceFile.uploadFiles.splice(idx, 1)
        return true;
      }

      this.ruleForm.projectBasicVo.financeFileId = response.data.fileUuid;
      this.financeFile.push(file)
    },

    handleFinanceRemove(file, fileList) {
      this.financeFile = fileList
      if (!this.financeFile.length) {
        this.ruleForm.projectBasicVo.financeFileId = ''
      }
    },

    handleApplyDescChange(file, fileList, v) {
      this.applyFile.push(file)
      if (this.applyFile.length > 0) {
        this.applyFile = [fileList[fileList.length - 1]]
      }
      return true
    },
    handleApplySuccess(response, file) {
      let uid = file.uid
      let idx = this.$refs.uploadApplyDescFile.uploadFiles.findIndex(item => item.uid == uid)
      if (response.code != 200) {
        this.$modal.msgError('文件格式或命名存在特殊字符,请检查后重新上传!');
        this.$refs.uploadApplyDescFile.uploadFiles.splice(idx, 1)
        return true;
      }

      this.ruleForm.projectBasicVo.applyFileId = response.data.fileUuid;
      this.applyFile.push(file)
    },


    handleApplyDescRemove(file, fileList) {
      this.applyFile = fileList
      if (!this.applyFile.length) {
        this.ruleForm.projectBasicVo.applyFileId = ''
      }
    },

    handleApplicationChange(file, fileList, v) {
      this.applicationFile.push(file)
      if (this.applicationFile.length > 0) {
        this.applicationFile = [fileList[fileList.length - 1]]
      }
      return true
    },
    handleApplicationSuccess(response, file) {
      console.log('handleFinanceSuccess', response)
      let uid = file.uid
      let idx = this.$refs.uploadApplicationFile.uploadFiles.findIndex(item => item.uid == uid)
      if (response.code != 200) {
        this.$modal.msgError('文件格式或命名存在特殊字符,请检查后重新上传!');
        this.$refs.uploadApplicationFile.uploadFiles.splice(idx, 1)
        return true;
      }

      this.ruleForm.projectBasicVo.applicationFileId = response.data.fileUuid;
      this.applicationFile.push(file)
    },

    handleApplicationRemove(file, fileList) {
      this.applicationFile = fileList
      if (!this.applicationFile.length) {
        this.ruleForm.projectBasicVo.applicationFileId = ''
      }
    },

    handleGetNodeUsers() {
      getNodeUsers({
        templateId: this.templateId,
        flowNo: '',
        targetAction: 'TO_NEXT',
        targetNodeId: ''
      }).then(res => {
        this.approveList = res.data
        this.ruleForm.targetUserName = res.data.length ? res.data[0].userName : ''
      })
    },
    // 新增银行账号
    handleAddCustomerBank() {
      if (!this.ruleForm.custNo) {
        this.$message.error("请先选择客户")
        return
      }
      this.$refs.customerBankRef.open({
        customerId: this.ruleForm.custNo,
        customerName: this.ruleForm.custName
      }, "add")
    },
    // 编辑银行账号
    handleEditCustomerBank(row) {
      this.$refs.customerBankRef.open(row, "edit");
    },
    // 删除银行账号
    handleDelCustomerBank(row, index) {
      removeCustomerBank({
        ids: [row.id],
        customerId: row.customerId
      }).then(res => {
        if (res.code === 200) {
          this.ruleForm.bankAccountList.splice(index, 1)
        } else {
          this.$message.error(res.msg)
        }
      })
    },
    // 新增或编辑成功后回调
    handleCustomerBankOk(customerId) {
      allCustomerBank({ customerId }).then(res => {
        if (res.code === 200) {
          this.ruleForm.bankAccountList = res.data
        } else {
          this.$message.error(res.msg)
        }
      })
    },
    handleDel(i, type) {
      this.ruleForm[type].splice(i, 1);
      if (type === 'equipmentVos') {
        this.getSummaries({
          columns: this.$refs.table.columns,
          data: this.ruleForm.equipmentVos
        })
      }
    },

    handleChange(file, fileList, v) {
      if (v.fileList.length > 0) {
        v.fileList = [fileList[fileList.length - 1]]
      }
      return true
    },
    handleSuccess(response, file, fileList, v, i, uploadName) {
      let uid = file.uid
      let idx = this.$refs[uploadName].uploadFiles.findIndex(item => item.uid == uid)
      if (response.code != 200) {
        this.$modal.msgError('文件格式或命名存在特殊字符,请检查后重新上传!');
        this.$refs[uploadName].uploadFiles.splice(idx, 1)
        return true;
      }

      v.fileName = response.data.fileName;
      v.fileUuid = response.data.fileUuid;
      v.fileId = response.data.fileUuid
      v.fileList.push(file)
    },

    handleRemove(file, fileList, v) {
      v.fileList = fileList
      if (!v.fileList.length) {
        v.fileId = ''
        v.fileName = ''
        v.fileUuid = ''
      }
    },

    deleteFileList(row, index) {
      row.splice(index, 1);
    },
    addFileList(row) {
      row.push({
        fileName: '',
        fileUuid: '',
        fileId: '',
        fileRemark: '',
        fileList: []
      })
    },

    // 获取出租方列表
    getLessor() {
      getCompanyList("flcompany").then(res => {
        this.lessorList = res.rows
      })
    },

    // 选择代理商
    handleAgentClick() {
      this.$refs.agentTableRef.sync()
    },
    handleAgentOk(row) {
      this.ruleForm.projectBasicVo.agentName = row.agentName
    },
    // 发票信息保存
    handleCheckInvoice() {
      if (this.ruleForm.projectBasicVo.invoice_address == '') {
        this.$modal.msgError('发票信息请输入详细地址');
      } else if (this.ruleForm.projectBasicVo.invoice_bank == '') {
        this.$modal.msgError('发票信息请输入开户行');
      } else if (this.ruleForm.projectBasicVo.invoice_account == '') {
        this.$modal.msgError('发票信息请输入账号');
      } else if (this.ruleForm.projectBasicVo.invoice_tle == '') {
        this.$modal.msgError('发票信息请输入电话');
      } else {
        customerEdit({
          customerId: this.ruleForm.custNo,
          invoiceInfo: {
            invoiceTitle: this.ruleForm.projectBasicVo.invoice_title,
            dutyParagraph: this.ruleForm.projectBasicVo.tax_no,
            invoiceAddress: this.ruleForm.projectBasicVo.invoice_address,
            invoiceBank: this.ruleForm.projectBasicVo.invoice_bank,
            invoiceBankno: this.ruleForm.projectBasicVo.invoice_account,
            invoiceTel: this.ruleForm.projectBasicVo.invoice_tle,
            customerId: this.ruleForm.custNo,
          }
        }).then(res => {
          this.$modal.msgSuccess('保存成功');
          this.handleCustomerInfo()
        })
      }
    },
    DZaddressChange(e) {
      this.ruleForm.projectBasicVo.mailDetailAddr = e.filter(item => item != '').length ? e.join("") : this.ruleForm.projectBasicVo.mailDetailAddr
      this.defaultMailAddress.province = e[0] || ''
      this.defaultMailAddress.city = e[1] || ''
      this.defaultMailAddress.area = e[2] || ''
      this.defaultMailAddress.town = e[3] || ''
    },
    // 邮寄地址保存
    handleCheckContact() {
      if (this.ruleForm.projectBasicVo.mailDetailAddr == '') {
        this.$modal.msgError('邮寄地址请输入详细地址');
      } else if (this.ruleForm.projectBasicVo.recipientName == '') {
        this.$modal.msgError('邮寄地址请输入收件人名称');
      } else if (this.ruleForm.projectBasicVo.recipientPhone == '') {
        this.$modal.msgError('邮寄地址请输入收件人电话');
      } else if (this.ruleForm.projectBasicVo.recipEmail == '') {
        this.$modal.msgError('邮寄地址请输入电子邮箱');
      } else {
        console.log('this.defaultMailAddress[0],', this.defaultMailAddress[0], this.defaultMailAddress,)
        customerEdit({
          customerId: this.ruleForm.custNo,
          addressInfo: {
            id: this.ruleForm.projectBasicVo.id,
            detailAddress: this.ruleForm.projectBasicVo.mailDetailAddr,
            recipName: this.ruleForm.projectBasicVo.recipientName,
            recipeTel: this.ruleForm.projectBasicVo.recipientPhone,
            recipEmail: this.ruleForm.projectBasicVo.recipEmail,
            province: this.defaultMailAddress.province,
            city: this.defaultMailAddress.city,
            area: this.defaultMailAddress.area,
            town: this.defaultMailAddress.town,
            customerId: this.ruleForm.custNo,
          }
        }).then(res => {
          this.$modal.msgSuccess('保存成功');
        })
      }
    },
    // 中登网信息保存
    handleCheckNetwork() {
      if (this.ruleForm.projectBasicVo.zdpresenInfo == '') {
        this.$modal.msgError('中登网请输入情况说明');
      } else {
        customerEdit({
          customerId: this.ruleForm.custNo,
          thirdInfo: {
            annexInfoList: this.ruleForm.projectBasicVo.networkRuleForm.annexInfoList.filter(item => item.fileUuid.length),
            zdpresenInfo: this.ruleForm.projectBasicVo.zdpresenInfo,
            customerId: this.ruleForm.custNo,
          }
        }).then(res => {
          this.$modal.msgSuccess('保存成功');
        })
      }
    },
    // 选择客户
    handleCustClick() {
      if (!this.disabled) {
        this.$refs.customTableRef.sync()
      }
    },
    handleCustOk(row) {
      this.addressShow = false
      console.log('选择客户', row)
      this.ruleForm.customerAdmitVo.customerAdmitInfo = row
      this.ruleForm.assetCondition = row.assetCondition
      this.ruleForm.assetConditionFile = row.assetConditionFile

      this.ruleForm.companyCondition = row.companyCondition
      this.ruleForm.companyConditionFile = row.companyConditionFile

      this.ruleForm.creditInfo = Number(row.creditInfo)
      this.ruleForm.creditCondition = row.creditCondition
      this.ruleForm.creditConditionFile = row.creditConditionFile

      this.ruleForm.surveyCondition = row.surveyCondition
      this.ruleForm.surveyConditionFile = row.surveyConditionFile

      this.ruleForm.guranteeCondition = row.guranteeCondition
      this.ruleForm.guranteeConditionFile = row.guranteeConditionFile

      this.ruleForm.customerinfoFile = row.customerinfoFile || ''
      if (this.ruleForm.customerinfoFile.length) {
        getSimpleFileInfo({
          uuidList: [{ fileUuid: row.customerinfoFile }]
        }).then(res => {
          const item = res.data[0];
          this.customerList = [{
            name: item.fileName,
          }]
        })
      }

      const keys = ['assetConditionFileList', 'companyConditionFileList', 'creditConditionFileList', 'surveyConditionFileList', 'guranteeConditionFileList', 'customerinfoFileList'];
      keys.forEach(key => {
        this.ruleForm[key] = this.processFileList(row[key]);
      });

      this.ruleForm.custName = row.customerName //客户评分授信名
      this.ruleForm.custNo = row.customerId
      this.ruleForm.bankAccountList = row.bankInfoList//银行账户信息
      this.ruleForm.projectBasicVo.invoice_title =  row.customerType === '01' ? row.enterprieName : row.customerName//发票抬头
      this.ruleForm.projectBasicVo.tax_no = row.customerType === '01' ? row.creditCode : ''//发票税号
      if (row.invoiceInfoList && row.invoiceInfoList.length != 0) {
        this.ruleForm.projectBasicVo.invoice_bank = row.invoiceInfoList[0].invoiceBank//发票开户行
        this.ruleForm.projectBasicVo.invoice_tle = row.invoiceInfoList[0].invoiceTel//发票联系电话
        this.ruleForm.projectBasicVo.invoice_account = row.invoiceInfoList[0].invoiceBankno//发票银行账号
        this.ruleForm.projectBasicVo.invoice_address = row.invoiceInfoList[0].invoiceAddress//发票地址
      }
      if (row.addressInfoList && row.addressInfoList.length != 0) {
        this.ruleForm.projectBasicVo.recipientName = row.addressInfoList[0].recipName//收件人名称
        this.ruleForm.projectBasicVo.id = row.addressInfoList[0].id//收件人名称
        this.ruleForm.projectBasicVo.recipientPhone = row.addressInfoList[0].recipeTel//收件人电话
        this.ruleForm.projectBasicVo.recipEmail = row.addressInfoList[0].recipEmail//收件人emall
        this.defaultMailAddress = [row.addressInfoList[0].province, row.addressInfoList[0].city, row.addressInfoList[0].area, row.addressInfoList[0].town]
        this.ruleForm.projectBasicVo.mailDetailAddr = row.addressInfoList[0].detailAddress//收件人详细地址
      }
      if (row.thirdInfoList && row.thirdInfoList.length != 0) {//中登网情况说明
        this.ruleForm.projectBasicVo.networkRuleForm = {
          ...row.thirdInfoList[0],
          // annexInfoList: row.thirdInfoList[0].annexIdList.map(item => {
          //   return {
          //     ...item,
          //     fileList: [{name: item.fileName}],
          //   }
          // })
          annexInfoList: !row.thirdInfoList[0].annexIdList.length ? [{ fileList: [], fileName: '', fileRemark: '', fileUuid: '' }] : row.thirdInfoList[0].annexIdList.map(item => {
            return {
              ...item,
              fileList: [{ name: item.fileName }],
            }
          })
        }
        this.ruleForm.projectBasicVo.networkRuleForm.zdpresenInfo = row.thirdInfoList[0].zdpresenInfo//中登网情况说明
      }
      this.ruleForm.projectBasicVo.customerName = row.userName
      this.ruleForm.projectBasicVo.customerNickName = row.customerName
      customerCreditInfo({ customerId: row.customerId }).then(res => {
        if (res.data) {
          this.ruleForm.customerCreditInfo = res.data
          this.configCreditLevelListFn(res.data.levelFinalId)
          this.ruleForm.SXPFShow = true
        } else {
          this.ruleForm.SXPFShow = false
          this.$message.warning("当前客户未进行授信评分")
        }
      })
      this.handleCustomerBankOk(row.customerId)
      this.handleQueryFiles(row)
    },
    configCreditLevelListFn(levelFinalId) {
      console.log('客户评分授信',)
      configCreditLevelList(levelFinalId).then(res1 => {
        if (res1.data) {
          this.ruleForm.configCreditLevelListData = res1.data
        }
      })
    },
    processFileList(paramsList) {
      if (paramsList === undefined || paramsList.length === 0) {
        return [{ fileList: [], fileName: '', fileRemark: '', fileUuid: '' }];
      }
      if (paramsList.length > 0) {
        return paramsList.map(item => ({
          fileList: [{ name: item.fileName }],
          fileName: item.fileName,
          fileRemark: item.fileRemark,
          fileUuid: item.fileUuid
        }));
      }
    },
    //图片回显
    handleQueryFiles(row) {
      if (row.customerType === '01') {
        queryFiles({
          fileId: row.licenseId,
          modelKey: 'original'
        }).then(res => {
          const blob = new Blob([res], { type: "image/jpeg" })
          const fileUrl = window.URL.createObjectURL(blob);
          this.ruleForm.hrefn = fileUrl
        })
        queryFiles({
          fileId: row.legalidcardFront,
          modelKey: 'original'
        }).then(res => {
          const blob = new Blob([res], { type: "image/jpeg" })
          const fileUrl = window.URL.createObjectURL(blob);
          this.ruleForm.frontFn = fileUrl
        })
        queryFiles({
          fileId: row.legalidcardReverse,
          modelKey: 'original'
        }).then(res => {
          const blob = new Blob([res], { type: "image/jpeg" })
          const fileUrl = window.URL.createObjectURL(blob);
          this.ruleForm.backFn = fileUrl
        })
      } else {
        queryFiles({
          fileId: row.idCardFront,
          modelKey: 'original'
        }).then(res => {
          const blob = new Blob([res], { type: "image/jpeg" })
          const fileUrl = window.URL.createObjectURL(blob);
          this.ruleForm.frontFn = fileUrl
        })
        queryFiles({
          fileId: row.idCardReverse,
          modelKey: 'original'
        }).then(res => {
          const blob = new Blob([res], { type: "image/jpeg" })
          const fileUrl = window.URL.createObjectURL(blob);
          this.ruleForm.backFn = fileUrl
        })
      }
    },
    createFileUrl(fileUuid, field) {
      if (!fileUuid) {
        this.$set(this.ruleForm.customerAdmitVo.customerAdmitInfo, field, this.hrefn)
        return
      }
      queryFiles({
        fileId: fileUuid,
        modelKey: 'original'
      }).then(res => {
        const blob = new Blob([res], { type: "image/jpeg" })
        const fileUrl = window.URL.createObjectURL(blob);
        this.$set(this.ruleForm.customerAdmitVo.customerAdmitInfo, field, fileUrl)
      })
    },

    // 选择设备
    handleEquipmentClick() {
      this.$refs.equipmentTableRef.sync()
    },
    handleEquipmentOk(row) {
      if (this.ruleForm.equipmentVos.length > 0 && this.ruleForm.equipmentVos.filter(item => item.companyCode !== row.companyCode).length > 0) {
        this.$message.error("只能选择同一个工厂的设备")
        return
      }
      this.ruleForm.projectBasicVo.relatedFactoryId = row.companyCode
      this.ruleForm.projectBasicVo.relatedFactoryName = row.company
      this.ruleForm.equipmentVos.push({
        ...row,
        num: 1,
        priceRetain: 50,
        totalPrice: 0
      })
      this.tableKey += 1;
    },

    handleImitateOpen() {
      let params = {
        ...this.ruleForm.rentCalculateVo.calculateInfo,
        downPaymentPercentage: this.downPaymentPercentage,
        marginPercentage: this.marginPercentage,
        feeRatePerYear: this.feeRatePerYear
      }
      this.$refs.rentCalculationRef.sync(params)
    },
    handlePrice(row) {
      row.totalPrice = row.num * (row.price || 0)
      return row.num * (row.price || 0)
    },
    getSummaries(param) {
      const { columns, data } = param;
      const sums = [];
      columns.forEach((column, index) => {
        // 对于不需要计算的列，直接设置为空字符串
        if ([0, 1, 2, 3, 4, 6].includes(index)) {
          sums[index] = '';
          return;
        }
        if ([5].includes(index)) {
          sums[index] = '合计总金额';
          return;
        }
        // 对于“总价”列，进行特殊处理
        if (index === 7) {
          // 初始化总价为0
          let totalPriceSum = 0;
          // 遍历数据行，累加有效总价
          data.forEach(item => {

            const totalPrice = Number(item[column.property]);
            if (!isNaN(totalPrice)) {
              totalPriceSum += totalPrice;
            }
          });
          // 设置合计总金额，并添加单位
          sums[index] = `${totalPriceSum.toFixed(2)}`
          sums[7] = numToChinaNumerals(totalPriceSum ?? 0)
          this.totalPrice = totalPriceSum
        }
      });
      return sums;
    },

    addressChange(e) {
      this.ruleForm.projectBasicVo.projectAddr = e
    },
    addressChanges(e) {
      this.ruleForm.projectBasicVo.mailAddr = e
    },
    // 校验除rules之外的字段
    validate() {
      if (this.ruleForm.equipmentVos.length === 0) {
        this.$message.error("设备列表不能为空")
        return false;
      }
      let res = true
      this.ruleForm.equipmentVos.forEach(item => {
        if (!item.price) {
          this.$message.error(`设备${item.equipmentName}单价不能为空`)
          res = false
        }
      })
      if (this.flowInfo.currNodeId === '1' && !this.ruleForm.factoryChecked) {
        this.$message.error("请勾选是否同意")
        res = false;
      }
      return res;
    },
    getNewDoc() {
      let params = JSON.parse(JSON.stringify(this.ruleForm))
      params.projectBasicVo.networkRuleForm.annexInfoList = params.projectBasicVo.networkRuleForm.annexInfoList.filter(item => item.fileUuid.length)
      params.projectBasicVo.projectAddr = this.ruleForm.projectBasicVo.projectAddr.join(',')
      params.projectBasicVo.guaraWay = this.ruleForm.projectBasicVo.guaraWay.join(',')
      params.projectBasicVo.mailAddr = this.ruleForm.projectBasicVo.mailAddr.join(',') + ":" + this.ruleForm.projectBasicVo.mailDetailAddr
      this.ruleForm.rentCalculateVo.calculateInfo.type = "common"
      params.customerAdmitVo.customerAdmitInfo = JSON.stringify(this.ruleForm.customerAdmitVo.customerAdmitInfo, (key, value) => {
        if (["hrefn", "frontFn", "backFn"].includes(key)) {
          return ""
        }
        return value
      })
      params.rentCalculateVo.calculateInfo = JSON.stringify(this.ruleForm.rentCalculateVo.calculateInfo)
      params.projectBasicVo.contractAmount = this.ruleForm.rentCalculateVo.calculateInfo.leasingPrice

      const assetConditionFileList = params.assetConditionFileList.filter(item => item.fileUuid.length)
      const companyConditionFileList = params.companyConditionFileList.filter(item => item.fileUuid.length)
      const creditConditionFileList = params.creditConditionFileList.filter(item => item.fileUuid.length)
      const surveyConditionFileList = params.surveyConditionFileList.filter(item => item.fileUuid.length)
      const guranteeConditionFileList = params.guranteeConditionFileList.filter(item => item.fileUuid.length)
      const customerinfoFileList = params.customerinfoFileList.filter(item => item.fileUuid.length)

      return {
        ...params,
        assetConditionFileList,
        companyConditionFileList,
        creditConditionFileList,
        surveyConditionFileList,
        guranteeConditionFileList,
        customerinfoFileList,
        flag: this.ruleForm.flag,
        flowNo: this.flowNo || ''
      }
    },
    handleSubmit(flag) {
      this.ruleForm.flag = flag
      console.log('确认提交', this.ruleForm)
      this.ruleForm.projectBasicVo.financeingFileId = this.ruleForm.fileVo.FINANCING.map(item => item.fileUuid).join(',')
      this.$refs['ruleForm'].validate((valid) => {
        console.log('确认提交校验', valid)
        if (valid) {
          if (this.ruleForm.projectBasicVo.leaseFileId == '') {
            this.$message.error("请上传《融资租赁申请书》")
          } else if (this.ruleForm.equipmentVos.length == 0) {
            this.$message.error("请选择设备信息")
          } else if (this.ruleForm.projectBasicVo.isFastApprove == '1') {
            if (this.ruleForm.customerAdmitVo.customerAdmitInfo.customerType == '01') {
              if (this.totalPrice > 2000000) {
                this.$message.error("法人快速审批总额不得超过：200万元")
              } else {
                this.$emit('submit', this.getNewDoc());
              }
            }
            if (this.ruleForm.customerAdmitVo.customerAdmitInfo.customerType == '02') {
              if (this.totalPrice > 500000) {
                this.$message.error("自然人快速审批总额不得超过：50万元")
              } else {
                this.$emit('submit', this.getNewDoc());
              }
            }
          } else {
            this.$emit('submit', this.getNewDoc());
          }
        } else {
          this.$message.error(this.$refs['ruleForm'].fields.find(field => field.validateMessage).validateMessage)
          return false
        }
      })
    },
    handleRepaymentCycleChange() {
      if (this.ruleForm.rentCalculateVo.calculateInfo.repaymentCycle !== 'MONTHLY') {
        this.ruleForm.rentCalculateVo.calculateInfo.breakPeriod = undefined
      }
    },
    // 下载模板文件
    downloadTemplateFile(url) {
      this.$message.success('下载已开始，请耐心等待，请勿重复点击')
      const a = document.createElement('a') // 创建一个<a></a>标签
      a.href = url // 下载文件地址
      // a.download = '太重集团（工起）合同管理平台使用培训手册.pptx' // 下载文件名字
      a.style.display = 'none'
      document.body.appendChild(a) // 将a标签追加到文档对象中
      a.click() // 模拟点击<a>标签,触发<a>标签的href的读取,浏览器自动下载文件
      a.remove() // 用完删除a标签
    },
    downloadFile(row) {
      getDownload(row.fileUuid, row.fileName)
    },
    downloadFileList(list) {
      list.forEach(item => {
        getDownload(item.fileUuid)
      })
    },
    formatMoney,
  }
}
</script>

<style lang="scss" scoped>
.box {
  margin-bottom: 10px;
  .title {
    margin-bottom: 10px;
    font-size: 21px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .box-card {
    margin-bottom: 10px;
  }
  .text {
    font-size: 16px;
    margin-top: 4px;
  }
}
.upload-demo {
  display: flex;
  align-items: center;
}
::v-deep .address-container .el-select {
  width: 133px;
}
.tz-icon-ppt {
  &:before {
    content: url("~@/assets/images/formApproal/icon-ppt.png");
  }
}
.tz-icon-doc {
  &:before {
    content: url("~@/assets/images/formApproal/icon-doc.png");
  }
}
.tz-icon-pdf {
  &:before {
    content: url("~@/assets/images/formApproal/icon-pdf.png");
  }
}
.tz-icon-add {
  &:before {
    content: url("~@/assets/images/formApproal/icon-add.png");
    padding-right: 5px;
  }
}
.upload-demo {
  display: flex;
  align-items: center;
  :deep(.el-upload-list) {
    width: 90%;
    .el-upload-list__item {
      margin-top: 0 !important;
    }
  }
}
:deep(.el-descriptions-item__label) {
  width: 120px;
}
</style>
